cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture...

25
CIS265 Lecture Notes – Java Maps Summer 2015-V.Matos DRIVER1 package csu.matos; import java.util.Map; import java.util.Set; import java.util.TreeMap; //GOAL: Implement a 'naive' translator (English-to-Spanish) using a Map class public class Driver { public static void main(String[] args){ //Map<String, String> map = new HashMap<>(); //Map<String, String> map = new LinkedHashMap<>(); Map<String, String> map = new TreeMap<>(); map.put("now", "ahora"); map.put("is", "es"); map.put("the", "de"); map.put("time", "hora"); map.put("for", "para"); map.put("all", "todo"); map.put("good", "bueno"); map.put("citizens", "ciudadanos"); System.out.println( map ); if(map.containsKey("now") ){ System.out.println( map.get("now") ); } System.out.println( map.get("rock-and-roll") ); map.put("country", "pais"); System.out.println( map ); map.put("country", "nacion"); System.out.println( map ); map.remove("countries"); prettyPrint(map); } private static void prettyPrint(Map<String, String> map) { Set<String> keys = map.keySet(); for(String k : keys ){ System.out.println( k + "\t" + map.get(k) ); }

Transcript of cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture...

Page 1: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

CIS265 Lecture Notes – Java MapsSummer 2015-V.Matos

DRIVER1

package csu.matos;

import java.util.Map;import java.util.Set;import java.util.TreeMap;

//GOAL: Implement a 'naive' translator (English-to-Spanish) using a Map class

public class Driver {

public static void main(String[] args){

//Map<String, String> map = new HashMap<>();//Map<String, String> map = new LinkedHashMap<>();Map<String, String> map = new TreeMap<>();map.put("now", "ahora");map.put("is", "es");map.put("the", "de");map.put("time", "hora");map.put("for", "para");map.put("all", "todo");map.put("good", "bueno");map.put("citizens", "ciudadanos");

System.out.println( map );

if(map.containsKey("now") ){System.out.println( map.get("now") );

}

System.out.println( map.get("rock-and-roll") );

map.put("country", "pais");System.out.println( map );

map.put("country", "nacion");System.out.println( map );

map.remove("countries");

prettyPrint(map);

}

private static void prettyPrint(Map<String, String> map) {Set<String> keys = map.keySet();for(String k : keys ){

System.out.println( k + "\t" + map.get(k) );}

}}

Page 2: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

Console

{all=todo, citizens=ciudadanos, for=para, good=bueno, is=es, now=ahora, the=de, time=hora}ahoranull{all=todo, citizens=ciudadanos, country=pais, for=para, good=bueno, is=es, now=ahora, the=de, time=hora}{all=todo, citizens=ciudadanos, country=nacion, for=para, good=bueno, is=es, now=ahora, the=de, time=hora}all todocitizens ciudadanoscountry nacionfor paragood buenois esnow ahorathe detime hora

DRIVER2

package csu.matos;

import java.io.File;import java.io.FileNotFoundException;import java.util.Map;import java.util.Scanner;import java.util.TreeMap;

public class Driver2 {//GOAL: count frequency of words held in a DISK text file

public static void main(String[] args) {

Map<String, Integer> map = new TreeMap<>();

try {File filePtr = new File("c:/temp/myfile.txt");Scanner scanner = new Scanner(filePtr);while (scanner.hasNext() ){

String line = scanner.nextLine();System.out.println( line );String[] tokens = line.split(" ");for(int i=0; i<tokens.length; i++){

System.out.println(i + "\t" + tokens[i] );

String key = tokens[i];

if( map.containsKey( key )){Integer value = map.get(key);map.put(key, value+1);

} else {map.put(key, 1);

}

}

}

Page 3: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

System.out.println( map );scanner.close();

} catch (FileNotFoundException e) {System.out.println( "PROBLEMS: " + e.getMessage() );

}

}

}

CONSOLE

now is the time0 now1 is2 the3 time

for all good citizens0 for1 all2 good3 citizens

to come in the aid0 to1 come2 in3 the4 aid

of their country0 of1 their2 country

{aid=1, all=1, citizens=1, come=1, country=1, for=1, good=1, in=1, is=1, now=1, of=1, the=2, their=1, time=1, to=1}

Page 4: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

DRIVER3

package csu.matos;

import java.io.File;import java.io.FileNotFoundException;import java.util.Map;import java.util.Scanner;import java.util.TreeMap;

public class Driver3 {//GOAL: translate ENGLISH text to SPANISH

public static void main(String[] args) {

try {File filePtr = new File("c:/temp/myfile.txt");Scanner scanner = new Scanner(filePtr);while (scanner.hasNext() ){

String line = scanner.nextLine();System.out.println( line );String[] tokens = line.split(" ");for(int i=0; i<tokens.length; i++){

String spanishWord = translate(tokens[i]);System.out.println( spanishWord );

}

}

scanner.close();

} catch (FileNotFoundException e) {System.out.println( "PROBLEMS: " + e.getMessage() );

}

}

private static String translate(String key ) {Map<String, String> map = new TreeMap<>();map.put("now", "ahora");map.put("is", "es");map.put("the", "de");map.put("time", "hora");map.put("for", "para");map.put("all", "todo");map.put("good", "bueno");map.put("citizens", "ciudadanos");

if ( map.get(key) == null ){return key;

}else {return map.get(key);

}

}

}

Page 5: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

CONSOLE

now is the timeahoraesdehora

for all good citizensparatodobuenociudadanos

to come in the aidtocomeindeaid

of their countryoftheircountry

Page 6: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

DRIVER4

package csu.matos;

import java.io.IOException;import java.net.URL;import java.util.Map;import java.util.Scanner;import java.util.TreeMap;

public class Driver4 {//GOAL: count frequency of words held in a REMOTE text file// Reading “Health & Science” news from NPR-RSS website

public static void main(String[] args) {

Map<String, Integer> map = new TreeMap<>();

try {

URL myLink = new URL("http://www.npr.org/rss/rss.php?id=1007");

Scanner scanner = new Scanner(myLink.openStream());

while (scanner.hasNext() ){String line = scanner.nextLine();System.out.println( line );// using \\b word-boundary regular expressionString[] tokens = line.split("\\b"); for(int i=0; i<tokens.length; i++){

String key = tokens[i];

if( map.containsKey( key )){Integer value = map.get(key);map.put(key, value+1);

} else {map.put(key, 1);

}

}

}

//all done!, now pretty printing for( String key: map.keySet() ){

System.out.println( map.get(key) + "\t" + key );}

scanner.close();

} catch ( IOException e) {System.out.println( "PROBLEMS: " + e.getMessage() );

}

}

}

CONSOLE

Page 7: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

<?xml version="1.0" encoding="UTF-8"?><rss xmlns:npr="http://www.npr.org/rss/" xmlns:nprml="http://api.npr.org/nprml" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"> <channel> <title>Science : NPR</title> <link>http://www.npr.org/templates/story/story.php?storyId=1007</link> <description>The latest health and science news. Updates on medicine, healthy living, nutrition, drugs, diet, and advances in science and technology. Subscribe to the Health &amp; Science podcast.</description> <language>en</language> <copyright>Copyright 2015 NPR - For Personal Use Only</copyright> <generator>NPR API RSS Generator 0.94</generator> <lastBuildDate>Tue, 09 Jun 2015 12:19:00 -0400</lastBuildDate> <image> <url>http://media.npr.org/images/podcasts/primary/npr_generic_image_300.jpg?s=200</url> <title>Science</title> <link>http://www.npr.org/templates/story/story.php?storyId=1007</link> </image> <item> <title>To Beat Insomnia, Try Therapy For The Underlying Cause Instead Of Pills</title> <description>A review of the medical evidence finds that therapy can break the cycle of chronic sleeplessness by addressing the anxieties that cause many people to stay awake.</description> <pubDate>Tue, 09 Jun 2015 12:19:00 -0400</pubDate> <link>http://www.npr.org/sections/health-shots/2015/06/09/412938919/to-beat-insomnia-try-therapy-for-underlying-cause-instead-of-pills?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/health-shots/2015/06/09/412938919/to-beat-insomnia-try-therapy-for-underlying-cause-instead-of-pills?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>A review of the medical evidence finds that therapy can break the cycle of chronic sleeplessness by addressing the anxieties that cause many people to stay awake.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412938919">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Maanvi Singh</dc:creator> </item> <item> <title>Smoking Pot Interferes With Math Skills, Study Finds</title> <description>Researchers studying the effects of marijuana faced an obstacle: they couldn't create an exact control group. But a change in drug laws in the Netherlands offered a perfect laboratory.</description> <pubDate>Tue, 09 Jun 2015 05:04:00 -0400</pubDate> <link>http://www.npr.org/2015/06/09/413069509/smoking-pot-interferes-with-math-skills-study-found?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/2015/06/09/413069509/smoking-pot-interferes-with-math-skills-study-found?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>Researchers studying the effects of marijuana faced an obstacle: they couldn't create an exact control group. But a change in drug laws in the Netherlands offered a perfect laboratory.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=413069509">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Shankar Vedantam</dc:creator> </item> <item> <title>As MERS Outbreak Surges, Genetic Tests Show Virus Hasn't Mutated</title> <description>So the spread of the Middle East respiratory syndrome in South Korea is probably due to other factors, such as a delayed response to the outbreak and poor infection control at hospitals.</description> <pubDate>Mon, 08 Jun 2015 20:38:00 -0400</pubDate> <link>http://www.npr.org/sections/goatsandsoda/2015/06/08/412913709/as-mers-outbreak-surges-genetic-tests-show-virus-hasnt-mutated?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/goatsandsoda/2015/06/08/412913709/as-mers-outbreak-surges-genetic-tests-show-virus-hasnt-mutated?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>So the spread of the Middle East respiratory syndrome in South Korea is probably due to other factors, such as a delayed response to the outbreak and poor infection control at hospitals.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412913709">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Michaeleen Doucleff</dc:creator> </item>

Page 8: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

<item> <title>Solar Sail Unfurls In Space</title> <description>A nonprofit has successfully tested technology that could one day be used to explore the solar system on a budget.</description> <pubDate>Mon, 08 Jun 2015 17:14:00 -0400</pubDate> <link>http://www.npr.org/sections/thetwo-way/2015/06/08/412939540/solar-sail-unfurls-in-space?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/thetwo-way/2015/06/08/412939540/solar-sail-unfurls-in-space?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>A nonprofit has successfully tested technology that could one day be used to explore the solar system on a budget.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412939540">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Geoff Brumfiel</dc:creator> </item> <item> <title>Online Health Searches Aren't Always Confidential </title> <description>Searching a medical issue on the Internet seems harmless enough, but one researcher found that online medical searches may be seen by hidden parties, and the data even sold for profit.</description> <pubDate>Mon, 08 Jun 2015 16:41:00 -0400</pubDate> <link>http://www.npr.org/sections/alltechconsidered/2015/06/08/412893469/online-health-searches-arent-always-confidential?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/alltechconsidered/2015/06/08/412893469/online-health-searches-arent-always-confidential?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>Searching a medical issue on the Internet seems harmless enough, but one researcher found that online medical searches may be seen by hidden parties, and the data even sold for profit.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412893469">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>NPR Staff</dc:creator> </item> <item> <title>Pitmasters Embrace New Barbecue Truth: Rested Meat Is Sublime</title> <description>How to rest a pork shoulder, a beef brisket or rack of ribs to keep it moist hours after it comes off the pit? Restaurants now use warming units, but DIY home warmers are just as good.</description> <pubDate>Mon, 08 Jun 2015 16:37:00 -0400</pubDate> <link>http://www.npr.org/sections/thesalt/2015/06/08/411778404/pitmasters-embrace-new-barbecue-truth-rested-meat-is-sublime?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/thesalt/2015/06/08/411778404/pitmasters-embrace-new-barbecue-truth-rested-meat-is-sublime?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>How to rest a pork shoulder, a beef brisket or rack of ribs to keep it moist hours after it comes off the pit? Restaurants now use warming units, but DIY home warmers are just as good.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=411778404">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Jim Shahin</dc:creator> </item> <item> <title>NASA's 'Flying Saucer' Test For Advanced Parachute Appears To Fail</title> <description>A giant balloon carried the Low-Density Supersonic Decelerator to an altitude of 120,000 feet to test the device, which could be used on Mars missions. It seemed to deploy correctly, then tear apart.</description> <pubDate>Mon, 08 Jun 2015 15:34:00 -0400</pubDate> <link>http://www.npr.org/sections/thetwo-way/2015/06/08/412933683/nasa-sends-flying-saucer-on-its-way-to-120-000-feet-above-earth?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/thetwo-way/2015/06/08/412933683/nasa-sends-flying-saucer-on-its-way-to-120-000-feet-above-earth?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>A giant balloon carried the Low-Density Supersonic Decelerator to an altitude of 120,000 feet to test the device, which could be used on Mars missions. It seemed to deploy correctly, then tear apart.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412933683">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Bill Chappell</dc:creator> </item> <item> <title>Do Creativity And Schizophrenia Share A Small Genetic Link? Maybe</title>

Page 9: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

<description>The notion goes back to the ancients — that minds given to flights of fancy are on the healthy side of a spectrum that includes what we today call psychosis. An Icelandic gene study offers new clues.</description> <pubDate>Mon, 08 Jun 2015 11:17:00 -0400</pubDate> <link>http://www.npr.org/sections/health-shots/2015/06/08/412314685/do-creativity-and-schizophrenia-share-a-small-genetic-link-maybe?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/health-shots/2015/06/08/412314685/do-creativity-and-schizophrenia-share-a-small-genetic-link-maybe?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>The notion goes back to the ancients — that minds given to flights of fancy are on the healthy side of a spectrum that includes what we today call psychosis. An Icelandic gene study offers new clues.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412314685">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Angus Chen</dc:creator> </item> <item> <title>Drought-Friendly Recipes Kick Up The Flavor — And Cut Back On Water</title> <description>An LA chef and his partner are cooking up recipes using ingredients that require less water to grow and cook with. They want to get us thinking about the resources that go into growing our food.</description> <pubDate>Mon, 08 Jun 2015 09:46:00 -0400</pubDate> <link>http://www.npr.org/sections/thesalt/2015/06/08/412037546/drought-friendly-recipes-kick-up-the-flavor-and-cut-back-on-water?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/thesalt/2015/06/08/412037546/drought-friendly-recipes-kick-up-the-flavor-and-cut-back-on-water?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>An LA chef and his partner are cooking up recipes using ingredients that require less water to grow and cook with. They want to get us thinking about the resources that go into growing our food.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412037546">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Ezra David Romero</dc:creator> </item> <item> <title>Lost Posture: Why Some Indigenous Cultures May Not Have Back Pain</title> <description>There are a few populations in the world where back pain hardly exists. One woman thinks she has figured out why, and she's sharing their secrets. Have Americans forgotten how to stand properly?</description> <pubDate>Mon, 08 Jun 2015 03:25:00 -0400</pubDate> <link>http://www.npr.org/sections/goatsandsoda/2015/06/08/412314701/lost-posture-why-indigenous-cultures-dont-have-back-pain?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/goatsandsoda/2015/06/08/412314701/lost-posture-why-indigenous-cultures-dont-have-back-pain?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>There are a few populations in the world where back pain hardly exists. One woman thinks she has figured out why, and she's sharing their secrets. Have Americans forgotten how to stand properly?</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412314701">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Michaeleen Doucleff</dc:creator> </item> <item> <title>What Makes Algorithms Go Awry?</title> <description>Every time you "Like" a Facebook post, among other things, you help provide data to an algorithm. But algorithms, like the humans who design them, aren't foolproof — and can reflect bias.</description> <pubDate>Sun, 07 Jun 2015 17:27:00 -0400</pubDate> <link>http://www.npr.org/sections/alltechconsidered/2015/06/07/412481743/what-makes-algorithms-go-awry?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/alltechconsidered/2015/06/07/412481743/what-makes-algorithms-go-awry?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>Every time you "Like" a Facebook post, among other things, you help provide data to an algorithm. But algorithms, like the humans who design them, aren't foolproof — and can reflect bias.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412481743">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>NPR Staff</dc:creator> </item> <item> <title>Both Sides Claim Victory Over EPA Fracking Study</title>

Page 10: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

<description>The Environmental Protection Agency has found no evidence that fracking has let to widespread, systemic pollution of water. Correspondent Jeff Brady tells NPR's Rachel Martin what the report means.</description> <pubDate>Sun, 07 Jun 2015 07:26:00 -0400</pubDate> <link>http://www.npr.org/2015/06/07/412633615/both-sides-claim-victory-over-epa-fracking-study?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/2015/06/07/412633615/both-sides-claim-victory-over-epa-fracking-study?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>The Environmental Protection Agency has found no evidence that fracking has let to widespread, systemic pollution of water. Correspondent Jeff Brady tells NPR's Rachel Martin what the report means.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412633615">&raquo; E-Mail This</a></p>]]></content:encoded> </item> <item> <title>Once Feared, Now Celebrated, Hudson River Cleanup Nears Its End</title> <description>General Electric is entering the final year of a billion-dollar cleanup of PCB-contaminated water. The project was once controversial — now, even some early critics are asking for it to be continued.</description> <pubDate>Sat, 06 Jun 2015 17:15:00 -0400</pubDate> <link>http://www.npr.org/2015/06/06/412335354/once-feared-now-celebrated-hudson-river-cleanup-nears-its-end?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/2015/06/06/412335354/once-feared-now-celebrated-hudson-river-cleanup-nears-its-end?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>General Electric is entering the final year of a billion-dollar cleanup of PCB-contaminated water. The project was once controversial — now, even some early critics are asking for it to be continued.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412335354">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Brian Mann</dc:creator> </item> <item> <title>For New Mexico's Chiles, The Enemy Isn't Just Drought But Salt, Too</title> <description>Farmers in New Mexico are worried about the future of the state's most beloved crop: green and red chiles. They're increasingly relying on salty groundwater, which damages the soil and the crops.</description> <pubDate>Sat, 06 Jun 2015 07:34:20 -0400</pubDate> <link>http://www.npr.org/sections/thesalt/2015/06/06/412297396/for-new-mexicos-chiles-the-enemy-isnt-just-drought-but-salt-too?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/thesalt/2015/06/06/412297396/for-new-mexicos-chiles-the-enemy-isnt-just-drought-but-salt-too?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>Farmers in New Mexico are worried about the future of the state's most beloved crop: green and red chiles. They're increasingly relying on salty groundwater, which damages the soil and the crops.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=412297396">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Mónica Ortiz Uribe</dc:creator> </item> <item> <title>Schools Say Ciao To Plastic Lunch Trays, Hello To Compostable Plates</title> <description>Six of the nation's largest school districts are ditching polystyrene lunch trays in favor of compostable plates. The hope is that they'll incentivize cities to build more composting facilities.</description> <pubDate>Sat, 06 Jun 2015 06:48:15 -0400</pubDate> <link>http://www.npr.org/sections/thesalt/2015/06/06/411986584/schools-say-ciao-to-plastic-lunch-trays-hello-to-compostable-plates?utm_medium=RSS&amp;utm_campaign=science</link> <guid>http://www.npr.org/sections/thesalt/2015/06/06/411986584/schools-say-ciao-to-plastic-lunch-trays-hello-to-compostable-plates?utm_medium=RSS&amp;utm_campaign=science</guid> <content:encoded><![CDATA[<p>Six of the nation's largest school districts are ditching polystyrene lunch trays in favor of compostable plates. The hope is that they'll incentivize cities to build more composting facilities.</p><p><a href="http://www.npr.org/templates/email/emailAFriend.php?storyId=411986584">&raquo; E-Mail This</a></p>]]></content:encoded> <dc:creator>Maanvi Singh</dc:creator> </item> </channel></rss>

Page 11: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

1072 107 <23 <16 </1 <1 </2 "1 &1 '16 -1 - 1 : 1 </5 " 1 ">15 ">&1 "?>30 &21 '1 ' 2 ,59 , 280 -129 .24 . 29 .</264 /3 /" 5 014 004 0001 031 0416 04001 0540 068 0724 088 095 12 10071 112 124 1201 143 152 164 172 191 22 201 20047 20151 251 261 272 341 371 381 413 4117784043 4119865843 4120375463 4122973963 4123146853 4123147013 412335354

Page 12: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

3 4124817433 4126336153 4128934693 4129137093 4129336833 4129389193 4129395403 4130695091 461 481 81 9495 :6 : 53 ://30 ;16 ; 1 <97 </1 <?78 =23 ="263 >30 ><15 ><![15 ></15 >]]></48 ?3 ? 3 ?</7 A1 API1 Advanced2 Agency1 Algorithms1 Always2 Americans4 An2 And1 Angus1 Appears1 Aren1 As1 Awry2 Back1 Barbecue1 Beat1 Bill1 Both2 Brady1 Brian1 Brumfiel5 But15 CDATA1 Cause1 Celebrated1 Chappell1 Chen1 Chiles1 Ciao1 Claim1 Cleanup1 Compostable1 Confidential1 Copyright2 Correspondent1 Creativity1 Cultures

Page 13: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

1 Cut2 DIY1 David2 Decelerator2 Density1 Do2 Doucleff2 Drought15 E1 EPA2 East2 Electric1 Embrace1 End1 Enemy2 Environmental2 Every1 Ezra2 Facebook1 Fail2 Farmers1 Feared1 Finds1 Flavor1 Flying4 For1 Fracking1 Friendly2 General1 Generator2 Genetic1 Geoff1 Go1 Hasn3 Have2 Health1 Hello2 How1 Hudson2 Icelandic1 In1 Indigenous1 Insomnia1 Instead1 Interferes2 Internet1 Is1 Isn2 It1 Its2 Jeff1 Jim16 Jun1 Just1 Kick2 Korea2 LA2 Like1 Link1 Lost2 Low1 Lunch1 MERS2 Maanvi15 Mail1 Makes1 Mann2 Mars

Page 14: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

2 Martin1 Math1 May1 Maybe1 Meat3 Mexico2 Michaeleen2 Middle8 Mon1 Mutated1 MÃ1 NASA7 NPR1 Nears2 Netherlands4 New1 Not1 Now1 Of1 On1 Once2 One1 Online1 Only1 Ortiz1 Outbreak1 Over2 PCB1 Pain1 Parachute1 Personal1 Pills1 Pitmasters1 Plastic1 Plates1 Posture1 Pot2 Protection31 RSS2 Rachel1 Recipes2 Researchers2 Restaurants1 Rested1 River1 Romero1 Sail1 Salt3 Sat1 Saucer1 Say1 Schizophrenia1 Schools3 Science1 Searches2 Searching1 Shahin1 Shankar1 Share1 Show1 Sides2 Singh2 Six1 Skills1 Small1 Smoking2 So1 Solar

Page 15: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

1 Some2 South1 Space2 Staff2 Study1 Sublime1 Subscribe2 Sun2 Supersonic1 Surges1 Test1 Tests12 The1 Therapy2 There4 They15 This4 To1 Too1 Trays1 Truth1 Try3 Tue1 UTF1 Underlying1 Unfurls1 Up1 Updates1 Uribe1 Use1 Vedantam1 Victory1 Virus1 Water1 What1 Why1 With15 [<54 a4 about2 above2 addressing1 advances2 after2 algorithm4 algorithms4 alltechconsidered2 altitude2 always2 among31 amp8 an2 ancients23 and2 anxieties2 apart1 api14 are2 aren2 arent6 as2 asking2 at2 awake2 awry8 back2 balloon2 barbecue

Page 16: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

8 be2 beat2 beef2 beloved2 bias2 billion2 both2 break2 brisket2 budget2 build6 but4 by2 call4 can2 carried4 cause2 celebrated2 change2 channel2 chef4 chiles2 chronic2 ciao2 cities2 claim4 cleanup2 clues1 com2 comes4 compostable2 composting2 confidential2 contaminated32 content2 continued4 control2 controversial2 cook2 cooking2 copyright2 correctly4 could2 couldn2 create2 creativity28 creator2 critics2 crop2 crops2 cultures2 cut2 cycle2 damages4 data2 day30 dc2 delayed2 deploy32 description2 design2 device1 diet2 districts2 ditching2 do2 dollar2 dont

Page 17: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

4 drought2 drug1 drugs1 dtd1 dtds2 due2 early2 earth2 effects1 elements15 email15 emailAFriend2 embrace1 en30 encoded1 encoding2 end2 enemy2 enough2 entering2 epa4 even4 evidence2 exact2 exists2 explore2 faced2 facilities2 factors2 fancy2 favor2 feared4 feet2 few2 figured2 final2 finds2 flavor2 flights2 flying2 food2 foolproof8 for2 forgotten6 found4 fracking2 friendly2 future2 gene2 generator4 genetic2 get2 giant2 given4 go4 goatsandsoda2 goes2 good2 green2 groundwater2 group2 grow2 growing30 guid2 hardly2 harmless8 has2 hasnt

Page 18: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

2 have7 health3 healthy2 hello2 help2 hidden2 his2 home2 hope2 hospitals2 hours2 how15 href53 http2 hudson2 humans2 image1 images15 in2 incentivize2 includes2 increasingly2 indigenous2 infection2 ingredients2 insomnia2 instead2 interferes2 into8 is2 isnt2 issue6 it30 item4 its2 itunes1 jpg4 just2 keep2 kick2 laboratory2 language2 largest2 lastBuildDate1 latest2 laws2 less2 let2 like36 link1 living2 ll2 lost4 lunch2 makes2 many2 marijuana2 math2 may2 maybe2 means2 meat1 media6 medical1 medicine2 mers2 mexicos2 minds

Page 19: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

2 missions1 modules2 moist2 more2 most2 mutated2 nasa2 nation2 nears6 new1 news1 nica2 no2 nonprofit2 notion6 now51 npr1 npr_generic_image_3002 nprml1 nutrition2 obstacle30 of2 off2 offered2 offers15 on4 once4 one4 online2 or52 org4 other2 our2 out4 outbreak2 over60 p4 pain2 parties2 partner2 people2 perfect17 php2 pills2 pit2 pitmasters2 plastic4 plates2 podcast1 podcasts2 pollution2 polystyrene2 poor2 populations2 pork2 post2 posture2 pot1 primary2 probably2 profit2 project2 properly2 provide2 psychosis30 pubDate2 purl2 rack

Page 20: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

15 raquo2 re4 recipes2 red2 reflect2 relying2 report2 require2 researcher2 resources2 respiratory2 response2 rest2 rested2 review2 ribs2 river4 rss11 s2 sail2 salt2 salty2 saucer2 say2 schizophrenia2 school2 schools32 science4 searches2 secrets24 sections2 seemed2 seems2 seen2 sends2 share2 sharing4 she4 shots2 shoulder2 show2 side2 sides2 skills2 sleeplessness2 small2 smoking2 soil4 solar2 sold2 some2 space2 spectrum2 spread2 stand2 state2 stay4 story17 storyId6 study2 studying2 sublime2 successfully2 such2 surges2 syndrome2 system2 systemic

Page 21: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;

7 t2 tear3 technology2 tells17 templates2 test2 tested2 tests20 that57 the2 their2 them2 then4 therapy8 thesalt4 thetwo4 they2 things2 thinking2 thinks2 time34 title45 to2 today2 too4 trays2 truth2 try2 underlying2 unfurls2 units4 up2 url2 us2 use4 used2 using30 utm_campaign30 utm_medium2 version2 victory2 virus2 want2 warmers2 warming2 was8 water6 way2 we6 what2 where4 which2 who4 why2 widespread4 with2 woman2 world2 worried49 www1 xml5 xmlns2 year4 you1 ³7 â7 €”

Page 22: cis.csuohio.educis.csuohio.edu/.../miscellaneous/05-Map-Class.docx  · Web viewCIS265 Lecture Notes – Java MapsSummer 2015-V.Matos. DRIVER1. package. csu.matos; import. java.util.Map;