text:
<metadata xmlns:ns0="http://purl.org/ornl/schema/mercury/terms/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://purl.org/ornl/schema/mercury/terms/v1.0 mercury-ornl-v1.xsd">
  <idinfo>
    <citation>
      <citeinfo>
        <origin>Waide, Robert</origin>
        <title>U.S. Long Term Ecological Research (LTER) Network</title>
        <onlink>http://daac.ornl.gov/metadata/bluangel_harvest/RGED/QC/basic/networks/lter.xml</onlink>
        <alt_onlink>http://daac.ornl.gov/metadata/bluangel_harvest/RGED/QC/basic/networks/lter.xml</alt_onlink>
        <onlink />
        <onlink />
      </citeinfo>
    </citation>
    <descript>
      <abstract>The U.S. Long Term Ecological Research (LTER) Network is a collaborative effort involving more than 1800 scientists and students investigating ecological processes over long temporal and broad spatial scales. The Network promotes synthesis and comparative research across sites and ecosystems and among other related national and international research programs. The National Science Foundation established the LTER program in 1980 to support research on long-term ecological phenomena in the United States.

The LTER program has organized its research around five core areas:

Pattern and control of primary production;
Spatial and temporal distribution of populations selected to represent trophic structures;
Pattern and control of organic matter accumulation and decomposition in surface layers and sediments;
Patterns of inorganic inputs and movements of nutrients through soils, groundwater and surface waters; and
Patterns and frequency of disturbances.

The 26 LTER Sites represent diverse ecosystems and research emphases. These sites include:

Andrews Experimental Forest, Blue River, Oregon
Upper Kuparuk River/Toolik Lake Watershed, Alaska
Baltimore Ecosystems Study (BES), Baltimore, Maryland
Bonanza Creek Experimental Forest and Caribou-Poker Creeks Research Watershed, Alaska
Central Arizona - Phoenix Urban (CAP), Arizona
California Current Ecosystem (CCE), California
Cedar Creek Natural History Area (CDR), Minnesota
Coweeta Hydrological Laboratory, Appalachian Mountains, Georgia
Florida Coastal Everglades, Florida
Georgia Coastal Ecosystems, Georgia
Harvard Forest, Massachusetts
Hubbard Brook Experimental Forest, White Mountain National Forest, New Hampshire
Jornada Basin, Chihuahuan Desert, New Mexico
Kellogg Biological Station, Michigan
Konza Prairie, Konza Prairie Biological Station, Kansas
Luquillo Experimental Forest, Puerto Rico
McMurdo Dry Valleys, Antarctica
Moorea Coral Reef, Moorea Island, Tahiti, French Polynesia
Niwot Ridge, Colorado
North Temperate Lakes, Wisconsin
Palmer Station, Antarctica
Plum Island Ecosystem, New England
Santa Barbara Coastal Zone, California
Sevilleta, Sevilleta National Wildlife Refuge, New Mexico
Shortgrass Steppe, Western Great Plains, Colorado
Virginia Coast Reserve, Eastern Shore, Virginia

The LTER Network Office coordinates communication, network publications, and research-planning activities.</abstract>
      <supplinf />
    </descript>
    <timeperd>
      <timeinfo>
        <rngdates>
          <begdate>19800101</begdate>
          <enddate />
        </rngdates>
      </timeinfo>
    </timeperd>
    <status>
      <progress>Ongoing</progress>
      <update>As appropriate</update>
    </status>
    <spdom>
      <bounding>
        <westbc>-149.833</westbc>
        <eastbc>162.52</eastbc>
        <northbc>68.62826</northbc>
        <southbc>-77</southbc>
      </bounding>
    </spdom>
    <keywords>
      <theme>
        <themekt>Parameter_Sensor_Source</themekt>
        <themekey>AIR TEMPERATURE|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>PRECIPITATION AMOUNT|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>PUBLIC HEALTH|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>BIOMASS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>BIOMASS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>COMMUNITY STRUCTURE|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>DECOMPOSITION|ANALYSIS|COMPUTER MODEL</themekey>
        <themekey>NUTRIENT CYCLING|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>PRIMARY PRODUCTION|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>TROPHIC DYNAMICS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>COASTAL HABITAT|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>ESTUARINE HABITAT|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LAKES|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>REEF HABITAT|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>RIVERS/STREAM HABITAT|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>POPULATION DYNAMICS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>AGRICULTURAL LANDS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>ALPINE/TUNDRA|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>BEACHES|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>DESERTS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>FORESTS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>GRASSLANDS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>MONTANE HABITATS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>SHRUBLAND/SCRUB|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>URBAN LANDS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>WETLANDS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>BIOMASS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>FOREST COMPOSITION/VEGETATION STRUCTURE|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>VEGETATION SPECIES|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LAND COVER|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LAND PRODUCTIVITY|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LAND RESOURCES|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LAND USE CLASSES|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LANDSCAPE MANAGEMENT|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LANDSCAPE MANAGEMENT|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LANDSCAPE PATTERNS|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>LANDSCAPE PROCESSES|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>RECLAMATION/REVEGETATION/RESTORATION|ANALYSIS|FIELD INVESTIGATION</themekey>
        <themekey>REFORESTATION|ANALYSIS|FIELD INVESTIGATION</themekey>
      </theme>
      <theme>
        <themekt>Parameter</themekt>
        <themekey>AIR TEMPERATURE</themekey>
      </theme>
      <theme>
        <themekt>Source</themekt>
        <themekey>FIELD INVESTIGATION</themekey>
      </theme>
      <theme>
        <themekt>Sensor</themekt>
        <themekey>ANALYSIS</themekey>
      </theme>
      <place>
        <placekt>Place Keywords</placekt>
        <placekey>Andrews LTER</placekey>
        <placekey>Arctic LTER</placekey>
        <placekey>Baltimore Ecosystems Study LTER</placekey>
        <placekey>Bonanza Creek LTER</placekey>
        <placekey>Central Arizona - Phoenix Urban LTER</placekey>
        <placekey>California Current Ecosystem LTER</placekey>
        <placekey>Cedar Creek Natural History Area LTER</placekey>
        <placekey>Coweeta Hydrological Laboratory LTER</placekey>
        <placekey>Florida Coastal Everglades LTER</placekey>
        <placekey>Georgia Coastal Ecosystems LTER</placekey>
        <placekey>Harvard Forest LTER</placekey>
        <placekey>Hubbard Brook LTER</placekey>
        <placekey>Jornada Basin LTER</placekey>
        <placekey>Kellogg Biological Station LTER</placekey>
        <placekey>Konza Prairie LTER</placekey>
        <placekey>Luquillo LTER</placekey>
        <placekey>McMurdo Dry Valleys LTER</placekey>
        <placekey>Moorea Coral Reef LTER</placekey>
        <placekey>Niwot Ridge LTER</placekey>
        <placekey>North Temperate Lakes LTER</placekey>
        <placekey>Palmer Station LTER</placekey>
        <placekey>Plum Island Ecosystem LTER</placekey>
        <placekey>Santa Barbara Coastal LTER</placekey>
        <placekey>Sevilleta LTER</placekey>
        <placekey>Shortgrass Steppe LTER</placekey>
        <placekey>Virginia Coast Reserve LTER</placekey>
      </place>
    </keywords>
    <ptcontac>
      <cntinfo>
        <cntperp>
          <cntper>Waide, Robert</cntper>
        </cntperp>
        <cntfax>6.1.10.8 Contact Electronic Mail: INTERNET &gt; rwaide@lternet.edu</cntfax>
      </cntinfo>
    </ptcontac>
  </idinfo>
  <distinfo>
    <distrib>
      <cntinfo>
        <cntperp>
          <cntorg>Long Term Ecological Research (LTER) Network Office, Department of Biology, University of New Mexico, Albuquerque, New Mexico 87131-0001 USA</cntorg>
          <cntper>McOwiti, Thomas</cntper>
        </cntperp>
        <cntvoice>+1-505-277-2597 (Phone)  +1-505-277-2541 (Fax)</cntvoice>
        <cntfax>6.1.10.8 Contact Electronic Mail: INTERNET &gt; rwaide@lternet.edu</cntfax>
        <cntemail>tmcowiti@lternet.edu</cntemail>
      </cntinfo>
    </distrib>
    <stdorder>
      <digform>
        <digtopt>
          <onlinopt>
            <computer>http://www.lternet.edu/</computer>
            <accinstr>Public</accinstr>
          </onlinopt>
        </digtopt>
      </digform>
    </stdorder>
    <resdesc>U.S. Long Term Ecological Research (LTER) Network. Funded by the National Science Foundation and coordinated by the Long Term Ecological Research (LTER) Network Office, Department of Biology, University of New Mexico, Albuquerque, New Mexico 87131-0001 USA. Also see home pages of individual research sites for data sets and information.</resdesc>
  </distinfo>
  <metainfo>
    <metd>20070105 130213</metd>
    <metc>
      <cntinfo>
        <cntorgp>
          <cntper>Curtis, Carroll</cntper>
        </cntorgp>
        <cntperp>
          <cntper>Curtis, Carroll</cntper>
        </cntperp>
        <cntvoice>+1-804-769-2495</cntvoice>
        <cntemail>cncurtis@crosslink.net</cntemail>
      </cntinfo>
    </metc>
    <metstdn>FGDC Content Standard for Digital Geospatial Metadata</metstdn>
  </metainfo>
  <mercury>
    <begdate>19800101</begdate>
    <enddate>2014924</enddate>
    <Site_Information>
      <Site>Andrews LTER</Site>
      <Westernmost_Longitude>-122.256</Westernmost_Longitude>
      <Easternmost_Longitude>-122.256</Easternmost_Longitude>
      <Northernmost_Latitude>44.212</Northernmost_Latitude>
      <Southernmost_Latitude>44.212</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Arctic LTER</Site>
      <Westernmost_Longitude>-149.59598</Westernmost_Longitude>
      <Easternmost_Longitude>-149.59598</Easternmost_Longitude>
      <Northernmost_Latitude>68.62826</Northernmost_Latitude>
      <Southernmost_Latitude>68.62826</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Baltimore Ecosystems Study LTER</Site>
      <Westernmost_Longitude>-76.3</Westernmost_Longitude>
      <Easternmost_Longitude>-76.3</Easternmost_Longitude>
      <Northernmost_Latitude>39.1</Northernmost_Latitude>
      <Southernmost_Latitude>39.1</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Bonanza Creek LTER</Site>
      <Westernmost_Longitude>-148</Westernmost_Longitude>
      <Easternmost_Longitude>-148</Easternmost_Longitude>
      <Northernmost_Latitude>64.8</Northernmost_Latitude>
      <Southernmost_Latitude>64.8</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Central Arizona - Phoenix Urban LTER</Site>
      <Westernmost_Longitude>-111.933</Westernmost_Longitude>
      <Easternmost_Longitude>-111.933</Easternmost_Longitude>
      <Northernmost_Latitude>33.427</Northernmost_Latitude>
      <Southernmost_Latitude>33.427</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>California Current Ecosystem LTER</Site>
      <Westernmost_Longitude>-120.2798</Westernmost_Longitude>
      <Easternmost_Longitude>-120.2798</Easternmost_Longitude>
      <Northernmost_Latitude>32.8736</Northernmost_Latitude>
      <Southernmost_Latitude>32.8736</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Cedar Creek Natural History Area LTER</Site>
      <Westernmost_Longitude>-93.201</Westernmost_Longitude>
      <Easternmost_Longitude>-93.201</Easternmost_Longitude>
      <Northernmost_Latitude>45.401</Northernmost_Latitude>
      <Southernmost_Latitude>45.401</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Coweeta Hydrological Laboratory LTER</Site>
      <Westernmost_Longitude>-83.5</Westernmost_Longitude>
      <Easternmost_Longitude>-83.5</Easternmost_Longitude>
      <Northernmost_Latitude>35</Northernmost_Latitude>
      <Southernmost_Latitude>35</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Florida Coastal Everglades LTER</Site>
      <Westernmost_Longitude>-80.85327617</Westernmost_Longitude>
      <Easternmost_Longitude>-80.85327617</Easternmost_Longitude>
      <Northernmost_Latitude>25.46820617</Northernmost_Latitude>
      <Southernmost_Latitude>25.46820617</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Georgia Coastal Ecosystems LTER</Site>
      <Westernmost_Longitude>-81.371</Westernmost_Longitude>
      <Easternmost_Longitude>-81.371</Easternmost_Longitude>
      <Northernmost_Latitude>31.427</Northernmost_Latitude>
      <Southernmost_Latitude>31.427</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Harvard Forest LTER</Site>
      <Westernmost_Longitude>-72.2</Westernmost_Longitude>
      <Easternmost_Longitude>-72.2</Easternmost_Longitude>
      <Northernmost_Latitude>42.5</Northernmost_Latitude>
      <Southernmost_Latitude>42.5</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Hubbard Brook LTER</Site>
      <Westernmost_Longitude>-71.751</Westernmost_Longitude>
      <Easternmost_Longitude>-71.751</Easternmost_Longitude>
      <Northernmost_Latitude>43.94</Northernmost_Latitude>
      <Southernmost_Latitude>43.94</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Jornada Basin LTER</Site>
      <Westernmost_Longitude>-106.739851</Westernmost_Longitude>
      <Easternmost_Longitude>-106.739851</Easternmost_Longitude>
      <Northernmost_Latitude>32.61785</Northernmost_Latitude>
      <Southernmost_Latitude>32.61785</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Kellogg Biological Station LTER</Site>
      <Westernmost_Longitude>-85.4</Westernmost_Longitude>
      <Easternmost_Longitude>-85.4</Easternmost_Longitude>
      <Northernmost_Latitude>42.4</Northernmost_Latitude>
      <Southernmost_Latitude>42.4</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Konza Prairie LTER</Site>
      <Westernmost_Longitude>-96.4</Westernmost_Longitude>
      <Easternmost_Longitude>-96.4</Easternmost_Longitude>
      <Northernmost_Latitude>39.1</Northernmost_Latitude>
      <Southernmost_Latitude>39.1</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Luquillo LTER</Site>
      <Westernmost_Longitude>-65.8</Westernmost_Longitude>
      <Easternmost_Longitude>-65.8</Easternmost_Longitude>
      <Northernmost_Latitude>18.3</Northernmost_Latitude>
      <Southernmost_Latitude>18.3</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>McMurdo Dry Valleys LTER</Site>
      <Westernmost_Longitude>162.52</Westernmost_Longitude>
      <Easternmost_Longitude>162.52</Easternmost_Longitude>
      <Northernmost_Latitude>-77</Northernmost_Latitude>
      <Southernmost_Latitude>-77</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Moorea Coral Reef LTER</Site>
      <Westernmost_Longitude>-149.833</Westernmost_Longitude>
      <Easternmost_Longitude>-149.833</Easternmost_Longitude>
      <Northernmost_Latitude>-17.5</Northernmost_Latitude>
      <Southernmost_Latitude>-17.5</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Niwot Ridge LTER</Site>
      <Westernmost_Longitude>-105.375</Westernmost_Longitude>
      <Easternmost_Longitude>-105.375</Easternmost_Longitude>
      <Northernmost_Latitude>39.993</Northernmost_Latitude>
      <Southernmost_Latitude>39.993</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>North Temperate Lakes LTER</Site>
      <Westernmost_Longitude>-89.7</Westernmost_Longitude>
      <Easternmost_Longitude>-89.7</Easternmost_Longitude>
      <Northernmost_Latitude>46</Northernmost_Latitude>
      <Southernmost_Latitude>46</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Palmer Station LTER</Site>
      <Westernmost_Longitude>-64</Westernmost_Longitude>
      <Easternmost_Longitude>-64</Easternmost_Longitude>
      <Northernmost_Latitude>-64.7</Northernmost_Latitude>
      <Southernmost_Latitude>-64.7</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Plum Island Ecosystem LTER</Site>
      <Westernmost_Longitude>-70.891</Westernmost_Longitude>
      <Easternmost_Longitude>-70.891</Easternmost_Longitude>
      <Northernmost_Latitude>42.759</Northernmost_Latitude>
      <Southernmost_Latitude>42.759</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Santa Barbara Coastal LTER</Site>
      <Westernmost_Longitude>-119.9503</Westernmost_Longitude>
      <Easternmost_Longitude>-119.9503</Easternmost_Longitude>
      <Northernmost_Latitude>34.4239</Northernmost_Latitude>
      <Southernmost_Latitude>34.4239</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Sevilleta LTER</Site>
      <Westernmost_Longitude>-106.882</Westernmost_Longitude>
      <Easternmost_Longitude>-106.882</Easternmost_Longitude>
      <Northernmost_Latitude>34.353</Northernmost_Latitude>
      <Southernmost_Latitude>34.353</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Shortgrass Steppe LTER</Site>
      <Westernmost_Longitude>-104.8</Westernmost_Longitude>
      <Easternmost_Longitude>-104.8</Easternmost_Longitude>
      <Northernmost_Latitude>40.8</Northernmost_Latitude>
      <Southernmost_Latitude>40.8</Southernmost_Latitude>
    </Site_Information>
    <Site_Information>
      <Site>Virginia Coast Reserve LTER</Site>
      <Westernmost_Longitude>-75.913</Westernmost_Longitude>
      <Easternmost_Longitude>-75.913</Easternmost_Longitude>
      <Northernmost_Latitude>37.283</Northernmost_Latitude>
      <Southernmost_Latitude>37.283</Southernmost_Latitude>
    </Site_Information>
    <Keywords>Antarctica</Keywords>
    <Keywords>Coastal areas</Keywords>
    <Keywords>Comparative ecosystem analysis</Keywords>
    <Keywords>Coral reefs</Keywords>
    <Keywords>Database management systems</Keywords>
    <Keywords>Decomposition</Keywords>
    <Keywords>Deserts</Keywords>
    <Keywords>Disturbance patterns</Keywords>
    <Keywords>Ecological dynamics</Keywords>
    <Keywords>Ecology</Keywords>
    <Keywords>Ecosystems</Keywords>
    <Keywords>EOSDIS</Keywords>
    <Keywords>Estuaries</Keywords>
    <Keywords>Everglades</Keywords>
    <Keywords>Environmental change</Keywords>
    <Keywords>Environmental health</Keywords>
    <Keywords>Environmental science</Keywords>
    <Keywords>Forests</Keywords>
    <Keywords>French Polynesia</Keywords>
    <Keywords>Freshwater resources</Keywords>
    <Keywords>Global change</Keywords>
    <Keywords>Global climatic change</Keywords>
    <Keywords>Grasslands</Keywords>
    <Keywords>Groundwater</Keywords>
    <Keywords>Inorganic matter</Keywords>
    <Keywords>Lakes</Keywords>
    <Keywords>Land characteristics</Keywords>
    <Keywords>Land resources</Keywords>
    <Keywords>Life sciences</Keywords>
    <Keywords>Litter</Keywords>
    <Keywords>Long-term research</Keywords>
    <Keywords>LTER</Keywords>
    <Keywords>Network Collections</Keywords>
    <Keywords>North America</Keywords>
    <Keywords>Nutrients</Keywords>
    <Keywords>Organic matter</Keywords>
    <Keywords>Population distribution</Keywords>
    <Keywords>Prairies</Keywords>
    <Keywords>Primary production</Keywords>
    <Keywords>Puerto Rico</Keywords>
    <Keywords>Remote sensing</Keywords>
    <Keywords>Sediments</Keywords>
    <Keywords>Shortgrass steppe</Keywords>
    <Keywords>Social sciences</Keywords>
    <Keywords>Sociology</Keywords>
    <Keywords>Soils</Keywords>
    <Keywords>Surface water</Keywords>
    <Keywords>Tahiti</Keywords>
    <Keywords>Terrestrial ecosystems</Keywords>
    <Keywords>Trophic structure</Keywords>
    <Keywords>United States</Keywords>
    <Keywords>Upwelling</Keywords>
    <Keywords>Urban areas</Keywords>
    <Keywords>Watersheds</Keywords>
    <Keywords>Wetlands</Keywords>
    <Parameter_Description>
      <Parameter>AIR TEMPERATURE</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>ATMOSPHERIC TEMPERATURE</Term>
      <Topic>ATMOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>PRECIPITATION AMOUNT</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>PRECIPITATION</Term>
      <Topic>ATMOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>PUBLIC HEALTH</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>HUMAN HEALTH</Term>
      <Topic>HUMAN DIMENSIONS</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>BIOMASS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>ZOOLOGY</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>BIOMASS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>ECOLOGICAL DYNAMICS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>COMMUNITY STRUCTURE</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>ECOLOGICAL DYNAMICS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>DECOMPOSITION</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>COMPUTER MODEL</Source>
      <Term>ECOLOGICAL DYNAMICS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>NUTRIENT CYCLING</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>ECOLOGICAL DYNAMICS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>PRIMARY PRODUCTION</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>ECOLOGICAL DYNAMICS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>TROPHIC DYNAMICS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>ECOLOGICAL DYNAMICS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>COASTAL HABITAT</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>AQUATIC HABITAT</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>ESTUARINE HABITAT</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>AQUATIC HABITAT</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LAKES</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>AQUATIC HABITAT</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>REEF HABITAT</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>AQUATIC HABITAT</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>RIVERS/STREAM HABITAT</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>AQUATIC HABITAT</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>POPULATION DYNAMICS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>ECOLOGICAL DYNAMICS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>AGRICULTURAL LANDS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>ALPINE/TUNDRA</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>BEACHES</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>DESERTS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>FORESTS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>GRASSLANDS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>MONTANE HABITATS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>SHRUBLAND/SCRUB</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>URBAN LANDS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>WETLANDS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>TERRESTRIAL ECOSYSTEMS</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>BIOMASS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>VEGETATION</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>FOREST COMPOSITION/VEGETATION STRUCTURE</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>VEGETATION</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>VEGETATION SPECIES</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>VEGETATION</Term>
      <Topic>BIOSPHERE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LAND COVER</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LAND USE/LAND COVER</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LAND PRODUCTIVITY</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LAND USE/LAND COVER</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LAND RESOURCES</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LAND USE/LAND COVER</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LAND USE CLASSES</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LAND USE/LAND COVER</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LANDSCAPE MANAGEMENT</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LANDSCAPE</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LANDSCAPE MANAGEMENT</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LANDSCAPE</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LANDSCAPE PATTERNS</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LANDSCAPE</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>LANDSCAPE PROCESSES</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LANDSCAPE</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>RECLAMATION/REVEGETATION/RESTORATION</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LANDSCAPE</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Parameter_Description>
      <Parameter>REFORESTATION</Parameter>
      <Sensor>ANALYSIS</Sensor>
      <Source>FIELD INVESTIGATION</Source>
      <Term>LANDSCAPE</Term>
      <Topic>LAND SURFACE</Topic>
    </Parameter_Description>
    <Project />
    <Navpath>FIELD INVESTIGATION|ANALYSIS|AIR TEMPERATURE</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|PRECIPITATION AMOUNT</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|PUBLIC HEALTH</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|BIOMASS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|BIOMASS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|COMMUNITY STRUCTURE</Navpath>
    <Navpath>COMPUTER MODEL|ANALYSIS|DECOMPOSITION</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|NUTRIENT CYCLING</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|PRIMARY PRODUCTION</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|TROPHIC DYNAMICS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|COASTAL HABITAT</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|ESTUARINE HABITAT</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LAKES</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|REEF HABITAT</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|RIVERS/STREAM HABITAT</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|POPULATION DYNAMICS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|AGRICULTURAL LANDS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|ALPINE/TUNDRA</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|BEACHES</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|DESERTS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|FORESTS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|GRASSLANDS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|MONTANE HABITATS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|SHRUBLAND/SCRUB</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|URBAN LANDS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|WETLANDS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|BIOMASS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|FOREST COMPOSITION/VEGETATION STRUCTURE</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|VEGETATION SPECIES</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LAND COVER</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LAND PRODUCTIVITY</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LAND RESOURCES</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LAND USE CLASSES</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LANDSCAPE MANAGEMENT</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LANDSCAPE MANAGEMENT</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LANDSCAPE PATTERNS</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|LANDSCAPE PROCESSES</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|RECLAMATION/REVEGETATION/RESTORATION</Navpath>
    <Navpath>FIELD INVESTIGATION|ANALYSIS|REFORESTATION</Navpath>
    <Principal_Investigator>
      <Name>Waide, Robert</Name>
      <Email>rwaide@lternet.edu</Email>
    </Principal_Investigator>
    <Data_Set_Link>
      <URL>http://www.lternet.edu/data/</URL>
      <Label>LTER Data</Label>
      <Link_Note>This web page contains links to LTER Climate/Hydrology Data; Site Climate Summary; LTER Network Data Access Policy; LTER Data Catalog; LTER Data Table of Contents; and Annual NPP Data.</Link_Note>
    </Data_Set_Link>
    <Data_Set_Link>
      <URL>http://metacat.lternet.edu/knb/index.jsp</URL>
      <Label>LTER Data Catalog</Label>
      <Link_Note>The LTER Data Catalog provides fast, effective, and open access to LTER data via a network-wide information system designed to facilitate data exchange and integration. Currently, the LTER Data Catalog contains entries for over 4000 ecological data sets from 26 LTER Network research sites, and thousands of additional data sets from numerous other ecological field stations and research institutions.</Link_Note>
    </Data_Set_Link>
    <Data_Set_Link>
      <URL>http://mercury.ornl.gov/ornldaac/</URL>
      <Label>ORNL DAAC Mercury Search Engine</Label>
      <Link_Note>Search for LTER data using the ORNL DAAC Mercury Search Engine.</Link_Note>
    </Data_Set_Link>
    <Documentation_Link>
      <URL />
      <Label />
      <Text />
    </Documentation_Link>
    <Documentation_Link>
      <URL />
      <Label />
    </Documentation_Link>
    <Alternate_Data_Access>
      <Data_Set_Status />
      <Data_Set_Restrictions />
      <Data_Set_Location />
      <Data_Contact_Person>
        <Email />
        <Name />
        <Phone />
        <Data_Center_URL />
      </Data_Contact_Person>
      <Data_Center_URL />
      <Data_Set_Citation />
      <Data_Set_Link>
        <URL />
        <Label />
        <Link_Note />
        <Data_Center_URL />
      </Data_Set_Link>
    </Alternate_Data_Access>
    <OME_Software_Version>Version 4.7.5, Revision Date: 04 Apr 2006</OME_Software_Version>
    <OME_DTD_Version>basic02.dtd</OME_DTD_Version>
    <Contact_Person>
      <Email>tmcowiti@lternet.edu</Email>
      <Name>McOwiti, Thomas</Name>
      <Phone>+1-505-277-2597 (Phone)  +1-505-277-2541 (Fax)</Phone>
    </Contact_Person>
    <Temporal_Resolution />
    <enddate_blank />
    <File_ID>Created 20070103 140224 by 69.19.86.152</File_ID>
    <Spatial_Reference_Method>Point</Spatial_Reference_Method>
    <Spatial_Extent>45487.42389578</Spatial_Extent>
    <Search_Text_Link>
      <URL />
      <Label />
    </Search_Text_Link>
    <Other_Link>
      <URL />
      <Label />
    </Other_Link>
    <Granule_Details />
    <OGC_URL />
  </mercury>
  <sourceData>database</sourceData>
</metadata>


text:
package com.android.tools.idea.editors.navigation.model;

import junit.framework.TestCase;
import com.android.tools.idea.editors.navigation.NavigationEditorUtils;

public class UtilitiesTest extends TestCase {

  public void testFileNameTranslation(){
    String correctJavaFileNameA = "FooBar.java";
    String correctJavaFileNameATranslation = "foo_bar";
    String correctJavaFileNameB = "IBinder.java";
    String correctJavaFileNameBTranslation = "i_binder";
    String correctXmlFileNameA = "foo_bar.xml";
    String correctXmlFileNameATranslation = "FooBar";
    String correctXmlFileNameB = "i_binder.xml";
    String correctXmlFileNameBTranslation = "IBinder";

    String xmlFileNameA = NavigationEditorUtils.getXmlFileNameFromJavaFileName(correctJavaFileNameA);
    String xmlFileNameB = NavigationEditorUtils.getXmlFileNameFromJavaFileName(correctJavaFileNameB);

    String javaFileNameA = NavigationEditorUtils.getJavaFileNameFromXmlFileName(correctXmlFileNameA);
    String javaFileNameB = NavigationEditorUtils.getJavaFileNameFromXmlFileName(correctXmlFileNameB);

    assertEquals(correctJavaFileNameATranslation, xmlFileNameA);
    assertEquals(correctJavaFileNameBTranslation, xmlFileNameB);

    assertEquals(correctXmlFileNameATranslation, javaFileNameA);
    assertEquals(correctXmlFileNameBTranslation, javaFileNameB);
  }

}

redpajama_set_name: RedPajamaGithub


text:
require 'mongo-db-utils/models/config'

describe MongoDbUtils::Model::Config do

  class MockWriter
    attr_accessor :instance
    def save(instance)
      @instance = instance
    end

    def flush
    end
  end

  before(:each) do
    @config = MongoDbUtils::Model::Config.new
    @config.writer = MockWriter.new
  end

  it "should construct" do
    @config.should_not be_nil
  end

  it "should add a single db" do
    @config.add_single_db( "mongodb://localhost:27017/db")
    @config.dbs.length.should == 1
    @config.add_single_db( "mongodb://localhost:27017/db2")
    @config.dbs.length.should == 2
  end

  it "should not add the db if its already there" do
    @config.add_single_db( "mongodb://localhost:27017/db")
    @config.add_single_db( "mongodb://localhost:27017/db")
    @config.dbs.length.should == 1
  end

  it "should remove a single db" do
    @config.add_single_db( "mongodb://localhost:27017/db")
    @config.dbs.length.should == 1
    @config.remove_db(@config.dbs[0])
    @config.dbs.length.should == 0
  end

  it "should add a replica set" do
    @config.dbs.length.should == 0
    result = @config.add_replica_set("mongodb://user:pass@host:port,host2:port2/db", "setOne")
    @config.dbs.length.should == 1
    @config.remove_db(@config.dbs[0])
    @config.dbs.length.should == 0
  end

  it "should throw an exception if add a nil db" do
    expect { @config.add_single_db(nil)}.to raise_error
  end

end


text:
title: next -
---
//[Kotlin utilities](../../index.html)/[it.czerwinski.kotlin.collections](../index.html)/[EmptyIterator](index.html)/[next](next.html)

# next
[common]
Content
open operator override fun [next](next.html)(): [Nothing](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-nothing/index.html)


text:
var concat = require('gulp-concat');
var dirSync = require('gulp-directory-sync');
var eslint = require('gulp-eslint');
var gulp = require('gulp');
var gutil = require('gulp-util');
var wwatch = require('gulp-watch');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sass = require('gulp-sass');
var uglify = require('gulp-uglify');
var ngAnnotate = require('gulp-ng-annotate');

// paths to files, used for 'watch'
var paths = {
  sass: ['./src/**/*.scss'],
  underscore: ['./node_modes/underscore/underscore-min.js']
};

// 'gulp'
gulp.task('default', ['lint', 'compress', 'sass', 'sync-static', 'sync-views']);

gulp.task('sync-underscore', function() {
  gulp.src('node_modes/underscore/underscore-min.js').pipe(gulp.dest('www/lib/underscore/'));
});

// 'gulp lint'
gulp.task('lint', function() {
  return gulp.src(['./src/**/*.js'])
    .pipe(eslint())
    .pipe(eslint.format('stylish', process.stderr));
});

// 'gulp compress'
gulp.task('compress', function() {
  return gulp.src(['./src/app.js', './src/views/**/*.js', './src/services/**/*.js'])
    .pipe(concat('app.js'))
    .pipe(ngAnnotate())
    .pipe(uglify())
    .pipe(gulp.dest('./www/js/'));
});

// 'gulp sass'
gulp.task('sass', function(done) {
  gulp.src('./src/styles/app.scss')
    .pipe(sass({
      errLogToConsole: true
    }))
    .pipe(gulp.dest('./www/css/'))
    .pipe(minifyCss({
      keepSpecialComments: 0
    }))
    .pipe(gulp.dest('./www/css/'))
    .on('end', done);
});

// 'gulp sync-static'
gulp.task('sync-static', function() {
  return gulp.src('')
    .pipe(dirSync('./src/static', './www/', 'nodelete', {
      printSummary: true
    }))
    .on('error', gutil.log);
});

// 'gulp sync-views'
gulp.task('sync-views', function() {
  return gulp.src('')
    .pipe(dirSync('./src/views', './www/views', 'nodelete', {
      printSummary: true
    }))
    .on('error', gutil.log);
});

// watch these files for changes
gulp.task('watch', function() {
  gulp.watch(paths.sass, ['sass']);
  gulp.watch(paths.underscore, ['sync-underscore']);
});


text:
typedef Deletable MessageData;

// Message type identifiers are listed here to avoid collisions
enum ThreadMessageTypes {
  kMessageService_Notify = 1,
  kAsyncRouter_Call,
  kAndroidLoop_Exit,
  kSyncRouter_Call,
};

// A facility for sending and receiving messages asynchronously
// across thread boundaries.
class ThreadMessageQueue {
 public:
  // Returns a pointer to the singleton
  static ThreadMessageQueue *GetInstance();

  // Message handlers implement this interface. All messages of a
  // given message_type will be directed the registered handler
  // for that message_type.
  class HandlerInterface {
   public:
    virtual void HandleThreadMessage(int message_type,
                                     MessageData *message_data) = 0;
  };

  // Registers an instance as a handler callback. There is
  // no means to unregister a handler, so this should only be used
  // for singleton instances if message handler class.
  void RegisterHandler(int message_type,
                       HandlerInterface *handler_instance);

  // Initializes the message queue for the current thread. If the
  // queue is already initialized, this is a no-op. Returns true
  // if the queue is successfully initialized.
  virtual bool InitThreadMessageQueue() = 0;

  // Returns the thread id of the currently executing thread.
  virtual ThreadId GetCurrentThreadId() = 0;

  // Posts a message to the indicated thread.  Returns true if the
  // message is successfully queued for delivery. In all cases,
  // ownership of the message data is transferred to the message queue.
  // Upon return from this method, callers should no longer touch the
  // message data.
  virtual bool Send(ThreadId thread_id,
                    int message_type,
                    MessageData *message_data) = 0;
 protected:
  ThreadMessageQueue() {}
  virtual ~ThreadMessageQueue() {}

  struct RegisteredHandler {
    RegisteredHandler() : instance(NULL) {}
    RegisteredHandler(HandlerInterface *inst) : instance(inst) {}
    HandlerInterface *instance;

    void Invoke(int message_type, MessageData *message_data) {
      if (instance)
        instance->HandleThreadMessage(message_type, message_data);
    }
  };

  bool GetRegisteredHandler(int message_type, RegisteredHandler *handler);

  // Protects handlers_ during inserts and finds.
  Mutex handler_mutex_;
  std::map<int, RegisteredHandler> handlers_;

 private:
  DISALLOW_EVIL_CONSTRUCTORS(ThreadMessageQueue);
};

#if OS_ANDROID || LINUX
// A facility for running a message loop for the calling thread.
class AndroidMessageLoop {
 public:
  // Starts the message loop for the calling thread.
  static void Start();
  // Run the message loop once. If the queue is empty when called,
  // this blocks until at least one message is received. This
  // processes all messages in the queue and then returns.
  // TODO(jripley): fix the following scenario:
  // The main thread is waiting in the main browser loop.
  // The main thread queue's event is signaled.
  // A message is dispatched on the main thread via
  // AsyncCallback, so the main thread queue's event is
  // left in signaled state.
  // Later RunOnce is called on the main thread.
  // RunOnce will find the event signaled and will
  // exit without having processed any messages.
  // Possible fix: Add Event::Clear() and call it
  // from AsyncCallback.
  static void RunOnce();
  // Stops the message loop for the given thread. The target thread
  // must be looping in Start().
  static void Stop(ThreadId thread_id);

 private:
  AndroidMessageLoop();
  DISALLOW_EVIL_CONSTRUCTORS(AndroidMessageLoop);
};
#endif

#ifdef USING_CCTESTS
// A mock implementation of the ThreadMessageQueue that
// can be used for testing.
class MockThreadMessageQueue : public ThreadMessageQueue {
 public:
  MockThreadMessageQueue() : current_thread_id_(0) {}

  virtual bool InitThreadMessageQueue() {
    initialized_threads_.insert(current_thread_id_);
    return true;
  }

  virtual ThreadId GetCurrentThreadId() {
    return current_thread_id_;
  }

  virtual bool Send(ThreadId thread_id,
                    int message_type,
                    MessageData *message_data);

  void SetMockCurrentThreadId(ThreadId thread_id) {
    current_thread_id_ = thread_id;
  }

  // Delivers messages that have been sent via the Send method
  // since the last time DeliverMockMessages was called.
  void DeliverMockMessages();

 private:
  ThreadId current_thread_id_;
  std::set<ThreadId> initialized_threads_;
  std::vector<ThreadId> pending_message_thread_ids_;
  std::vector<int> pending_message_types_;
  std::vector<linked_ptr<MessageData> > pending_messages_;

  DISALLOW_EVIL_CONSTRUCTORS(MockThreadMessageQueue);
};
#endif  // USING_CCTESTS

#endif  // GEARS_BASE_COMMON_MESSAGE_QUEUE_H__


text:
#include <monsoon/tag_matcher.h>
#include <ostream>
#include <sstream>
#include <unordered_set>
#include <monsoon/overload.h>
#include <monsoon/config_support.h>

namespace monsoon {
namespace {

bool has_defined_equality(const metric_value& x, const metric_value& y) {
  return equal(x, y).as_bool().has_value();
}

bool has_defined_compare(const metric_value& x, const metric_value& y) {
  return less(x, y).as_bool().has_value();
}

bool has_overlap(const tag_matcher::comparison_match& x,
                 const tag_matcher::comparison_match& y) {
  // Make elements of x and y easier to access.
  const tag_matcher::comparison x_op = std::get<0>(x);
  const tag_matcher::comparison y_op = std::get<0>(y);
  const metric_value& x_val = std::get<1>(x);
  const metric_value& y_val = std::get<1>(y);

  // Declare case labels for ease of use.
  constexpr tag_matcher::comparison eq = tag_matcher::comparison::eq;
  constexpr tag_matcher::comparison ne = tag_matcher::comparison::ne;
  constexpr tag_matcher::comparison lt = tag_matcher::comparison::lt;
  constexpr tag_matcher::comparison gt = tag_matcher::comparison::gt;
  constexpr tag_matcher::comparison le = tag_matcher::comparison::le;
  constexpr tag_matcher::comparison ge = tag_matcher::comparison::ge;

  metric_value mv;
  switch(x_op) {
    case eq:
      switch(y_op) {
        case eq:
          mv = equal(x_val, y_val);
          break;
        case ne:
          mv = unequal(x_val, y_val);
          break;
        case lt:
          mv = less(x_val, y_val);
          break;
        case gt:
          mv = greater(x_val, y_val);
          break;
        case le:
          mv = less_equal(x_val, y_val);
          break;
        case ge:
          mv = greater_equal(x_val, y_val);
          break;
      }
      break;
    case ne:
      switch(y_op) {
        case ne:
          mv = metric_value(has_defined_equality(x_val, y_val));
          break;
        case lt: [[fallthrough]];
        case gt: [[fallthrough]];
        case le: [[fallthrough]];
        case ge:
          mv = metric_value(has_defined_compare(x_val, y_val));
          break;
        case eq:
          mv = unequal(x_val, y_val);
          break;
      }
      break;
    case lt:
      switch(y_op) {
        case ne: [[fallthrough]];
        case lt: [[fallthrough]];
        case le:
          mv = metric_value(has_defined_compare(x_val, y_val));
          break;
        case gt: [[fallthrough]];
        case ge:
          mv = greater(x_val, y_val);
          break;
        case eq:
          mv = less(y_val, x_val);
          break;
      }
      break;
    case gt:
      switch(y_op) {
        case ne: [[fallthrough]];
        case gt: [[fallthrough]];
        case ge:
          mv = metric_value(has_defined_compare(x_val, y_val));
          break;
        case lt: [[fallthrough]];
        case le:
          mv = less(x_val, y_val);
          break;
        case eq:
          mv = greater(y_val, x_val);
          break;
      }
      break;
    case le:
      switch(y_op) {
        case ne: [[fallthrough]];
        case lt: [[fallthrough]];
        case le:
          mv = metric_value(has_defined_compare(x_val, y_val));
          break;
        case gt:
          mv = greater(x_val, y_val);
          break;
        case ge:
          mv = greater_equal(x_val, y_val);
          break;
        case eq:
          mv = less(y_val, x_val);
          break;
      }
      break;
    case ge:
      switch(y_op) {
        case ne: [[fallthrough]];
        case gt: [[fallthrough]];
        case ge:
          mv = metric_value(has_defined_compare(x_val, y_val));
          break;
        case lt:
          mv = less(x_val, y_val);
          break;
        case le:
          mv = less_equal(x_val, y_val);
          break;
        case eq:
          mv = greater(y_val, x_val);
          break;
      }
      break;
  }
  return mv.as_bool().value_or(false);
}

} /* namespace monsoon::<unnamed> */

bool tag_matcher::operator()(const tags& t) const {
  for (const auto& m : matcher_) {
    const bool cmp = std::visit(
        overload(
            [&t, &m](const presence_match&) {
              return t[m.first].has_value();
            },
            [&t, &m](const absence_match&) {
              return !t[m.first].has_value();
            },
            [&t, &m](const comparison_match& cmp) {
              auto opt_mv = t[m.first];
              if (!opt_mv) return false;

              metric_value mv;
              switch (std::get<0>(cmp)) {
                case eq:
                  mv = equal(opt_mv.value(), std::get<1>(cmp));
                  break;
                case ne:
                  mv = unequal(opt_mv.value(), std::get<1>(cmp));
                  break;
                case lt:
                  mv = less(opt_mv.value(), std::get<1>(cmp));
                  break;
                case gt:
                  mv = greater(opt_mv.value(), std::get<1>(cmp));
                  break;
                case le:
                  mv = less_equal(opt_mv.value(), std::get<1>(cmp));
                  break;
                case ge:
                  mv = greater_equal(opt_mv.value(), std::get<1>(cmp));
                  break;
              }
              return mv.as_bool().value_or(false);
            }),
        m.second);

    if (!cmp) return false;
  }
  return true;
}

void tag_matcher::check_comparison(std::string&& tagname, comparison cmp,
    metric_value&& tagvalue) {
  matcher_.emplace(
      std::piecewise_construct,
      std::forward_as_tuple(std::move(tagname)),
      std::forward_as_tuple(
          std::in_place_type<comparison_match>,
          std::move(cmp),
          std::move(tagvalue)));
}

void tag_matcher::check_comparison(std::string_view tagname, comparison cmp,
    const metric_value& tagvalue) {
  matcher_.emplace(
      std::piecewise_construct,
      std::forward_as_tuple(tagname),
      std::forward_as_tuple(
          std::in_place_type<comparison_match>,
          std::move(cmp),
          tagvalue));
}

void tag_matcher::check_presence(std::string&& tagname) {
  matcher_.emplace(
      std::piecewise_construct,
      std::forward_as_tuple(std::move(tagname)),
      std::forward_as_tuple(std::in_place_type<presence_match>));
}

void tag_matcher::check_presence(std::string_view tagname) {
  matcher_.emplace(
      std::piecewise_construct,
      std::forward_as_tuple(tagname),
      std::forward_as_tuple(std::in_place_type<presence_match>));
}

void tag_matcher::check_absence(std::string&& tagname) {
  matcher_.emplace(
      std::piecewise_construct,
      std::forward_as_tuple(std::move(tagname)),
      std::forward_as_tuple(std::in_place_type<absence_match>));
}

void tag_matcher::check_absence(std::string_view tagname) {
  matcher_.emplace(
      std::piecewise_construct,
      std::forward_as_tuple(tagname),
      std::forward_as_tuple(std::in_place_type<absence_match>));
}

bool has_overlap(const tag_matcher& x, const tag_matcher& y) {
  using absence_match = tag_matcher::absence_match;
  using presence_match = tag_matcher::presence_match;
  using comparison_match = tag_matcher::comparison_match;

  // Compare ranges using intersecting keys.
  // Note: cartesian product of ranges with the same key.
  for (const auto& x_entry : x) {
    tag_matcher::matcher_map::const_iterator y_range_b, y_range_e;
    std::tie(y_range_b, y_range_e) = y.matcher_.equal_range(x_entry.first);

    // Check if this x_entry is compatible with all y_entries with matching keys.
    const bool ranges_overlap = std::all_of(
        y_range_b, y_range_e,
        [&x_entry](const auto& y_entry) {
          return std::visit(
              overload(
                  // Both absent?
                  []([[maybe_unused]] const absence_match& x, [[maybe_unused]] const absence_match& y) {
                    return true;
                  },
                  // Fail: one absent, one present.
                  []([[maybe_unused]] const absence_match& x, [[maybe_unused]] const auto& y) {
                    return false;
                  },
                  []([[maybe_unused]] const auto& x, [[maybe_unused]] const absence_match& y) {
                    return false;
                  },
                  // Presence matches with any presence.
                  []([[maybe_unused]] const presence_match& x, [[maybe_unused]] const presence_match& y) {
                    return true;
                  },
                  []([[maybe_unused]] const presence_match& x, [[maybe_unused]] const comparison_match& y) {
                    return true;
                  },
                  []([[maybe_unused]] const comparison_match& x, [[maybe_unused]] const presence_match& y) {
                    return true;
                  },
                  // Comparison match.
                  [](const comparison_match& x, const comparison_match& y) {
                    return has_overlap(x, y);
                  }),
              x_entry.second, y_entry.second);
        });
    if (!ranges_overlap) return false;
  }
  return true;
}

auto operator<<(std::ostream& out, const tag_matcher& tm) -> std::ostream& {
  using namespace std::placeholders;
  using comparison = tag_matcher::comparison;
  using comparison_match = tag_matcher::comparison_match;
  using presence_match = tag_matcher::presence_match;
  using absence_match = tag_matcher::absence_match;

  bool first = true;
  for (const auto& v : tm) {
    if (!std::exchange(first, false)) out << ", ";
    std::visit(
        std::bind(
            overload(
                [&out](std::string_view qname, const presence_match&) {
                  out << qname;
                },
                [&out](std::string_view qname, const absence_match&) {
                  out << "!" << qname;
                },
                [&out](std::string_view qname, const comparison_match& cmp) {
                  std::string_view cmp_str;
                  switch (std::get<0>(cmp)) {
                    case tag_matcher::eq:
                      cmp_str = "=";
                      break;
                    case tag_matcher::ne:
                      cmp_str = "!=";
                      break;
                    case tag_matcher::lt:
                      cmp_str = "<";
                      break;
                    case tag_matcher::gt:
                      cmp_str = ">";
                      break;
                    case tag_matcher::le:
                      cmp_str = "<=";
                      break;
                    case tag_matcher::ge:
                      cmp_str = ">=";
                      break;
                  }
                  out << qname << cmp_str << std::get<1>(cmp);
                }
            ),
            maybe_quote_identifier(v.first), _1),
        v.second);
  }
  return out;
}

std::string to_string(const tag_matcher& tm) {
  return (std::ostringstream() << tm).str();
}

} /* namespace monsoon */


text:
DIR="$1"
echo "Storing the data to $DIR"

for variant in b_cells memory_t naive_t cd56_nk cd14_monocytes cd4_t_helper regulatory_t naive_cytotoxic;do
    dst="$DIR/$variant"
    mkdir -p "$dst"
    wget http://cf.10xgenomics.com/samples/cell-exp/1.1.0/$variant/${variant}_filtered_gene_bc_matrices.tar.gz -O - |tar xzv --directory "$dst"
done


text:
Meteor.publish('cloudMeetings', function () {
  return cloudMeetings.find();
});


text:
layout: none
published: true
title: ''
tags: rub3.8 läksyt
---
PAKOLLISET:

1. Täytä loppuun tekstin 3 fraasit vihkoon.

2. Lue ja suomenna teksti 4 (vika sanakoeteksti!) ja tee siihen liittyvä t. 1a kirjan s. 68.


text:
package test

import (
	"context"
	"testing"

	octrace "go.opencensus.io/trace"

	"go.opentelemetry.io/otel/attribute"
	ocbridge "go.opentelemetry.io/otel/bridge/opencensus"
	"go.opentelemetry.io/otel/bridge/opencensus/internal"
	"go.opentelemetry.io/otel/codes"
	sdktrace "go.opentelemetry.io/otel/sdk/trace"
	"go.opentelemetry.io/otel/sdk/trace/tracetest"
	"go.opentelemetry.io/otel/trace"
)

func TestMixedAPIs(t *testing.T) {
	sr := tracetest.NewSpanRecorder()
	tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
	tracer := tp.Tracer("mixedapitracer")
	octrace.DefaultTracer = ocbridge.NewTracer(tracer)

	func() {
		ctx := context.Background()
		var ocspan1 *octrace.Span
		ctx, ocspan1 = octrace.StartSpan(ctx, "OpenCensusSpan1")
		defer ocspan1.End()

		var otspan1 trace.Span
		ctx, otspan1 = tracer.Start(ctx, "OpenTelemetrySpan1")
		defer otspan1.End()

		var ocspan2 *octrace.Span
		ctx, ocspan2 = octrace.StartSpan(ctx, "OpenCensusSpan2")
		defer ocspan2.End()

		var otspan2 trace.Span
		_, otspan2 = tracer.Start(ctx, "OpenTelemetrySpan2")
		defer otspan2.End()
	}()

	spans := sr.Ended()

	if len(spans) != 4 {
		for _, span := range spans {
			t.Logf("Span: %s", span.Name())
		}
		t.Fatalf("Got %d spans, exepected %d.", len(spans), 4)
	}

	var parent trace.SpanContext
	for i := len(spans) - 1; i >= 0; i-- {
		// Verify that OpenCensus spans and OpenTelemetry spans have each
		// other as parents.
		if psid := spans[i].Parent().SpanID(); psid != parent.SpanID() {
			t.Errorf("Span %v had parent %v. Expected %v", spans[i].Name(), psid, parent.SpanID())
		}
		parent = spans[i].SpanContext()
	}
}

func TestStartOptions(t *testing.T) {
	sr := tracetest.NewSpanRecorder()
	tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
	octrace.DefaultTracer = ocbridge.NewTracer(tp.Tracer("startoptionstracer"))

	ctx := context.Background()
	_, span := octrace.StartSpan(ctx, "OpenCensusSpan", octrace.WithSpanKind(octrace.SpanKindClient))
	span.End()

	spans := sr.Ended()

	if len(spans) != 1 {
		t.Fatalf("Got %d spans, exepected %d", len(spans), 1)
	}

	if spans[0].SpanKind() != trace.SpanKindClient {
		t.Errorf("Got span kind %v, exepected %d", spans[0].SpanKind(), trace.SpanKindClient)
	}
}

func TestStartSpanWithRemoteParent(t *testing.T) {
	sr := tracetest.NewSpanRecorder()
	tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
	tracer := tp.Tracer("remoteparent")
	octrace.DefaultTracer = ocbridge.NewTracer(tracer)

	ctx := context.Background()
	ctx, parent := tracer.Start(ctx, "OpenTelemetrySpan1")

	_, span := octrace.StartSpanWithRemoteParent(ctx, "OpenCensusSpan", ocbridge.OTelSpanContextToOC(parent.SpanContext()))
	span.End()

	spans := sr.Ended()

	if len(spans) != 1 {
		t.Fatalf("Got %d spans, exepected %d", len(spans), 1)
	}

	if psid := spans[0].Parent().SpanID(); psid != parent.SpanContext().SpanID() {
		t.Errorf("Span %v, had parent %v.  Expected %d", spans[0].Name(), psid, parent.SpanContext().SpanID())
	}
}

func TestToFromContext(t *testing.T) {
	sr := tracetest.NewSpanRecorder()
	tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
	tracer := tp.Tracer("tofromcontext")
	octrace.DefaultTracer = ocbridge.NewTracer(tracer)

	func() {
		ctx := context.Background()

		_, otSpan1 := tracer.Start(ctx, "OpenTelemetrySpan1")
		defer otSpan1.End()

		// Use NewContext instead of the context from Start
		ctx = octrace.NewContext(ctx, internal.NewSpan(otSpan1))

		ctx, _ = tracer.Start(ctx, "OpenTelemetrySpan2")

		// Get the opentelemetry span using the OpenCensus FromContext, and end it
		otSpan2 := octrace.FromContext(ctx)
		defer otSpan2.End()
	}()

	spans := sr.Ended()

	if len(spans) != 2 {
		t.Fatalf("Got %d spans, exepected %d.", len(spans), 2)
	}

	var parent trace.SpanContext
	for i := len(spans) - 1; i >= 0; i-- {
		// Verify that OpenCensus spans and OpenTelemetry spans have each
		// other as parents.
		if psid := spans[i].Parent().SpanID(); psid != parent.SpanID() {
			t.Errorf("Span %v had parent %v. Expected %v", spans[i].Name(), psid, parent.SpanID())
		}
		parent = spans[i].SpanContext()
	}
}

func TestIsRecordingEvents(t *testing.T) {
	sr := tracetest.NewSpanRecorder()
	tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
	octrace.DefaultTracer = ocbridge.NewTracer(tp.Tracer("isrecordingevents"))

	ctx := context.Background()
	_, ocspan := octrace.StartSpan(ctx, "OpenCensusSpan1")
	if !ocspan.IsRecordingEvents() {
		t.Errorf("Got %v, expected true", ocspan.IsRecordingEvents())
	}
}

func attrsMap(s []attribute.KeyValue) map[attribute.Key]attribute.Value {
	m := make(map[attribute.Key]attribute.Value, len(s))
	for _, a := range s {
		m[a.Key] = a.Value
	}
	return m
}

func TestSetThings(t *testing.T) {
	sr := tracetest.NewSpanRecorder()
	tp := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(sr))
	octrace.DefaultTracer = ocbridge.NewTracer(tp.Tracer("setthings"))

	ctx := context.Background()
	_, ocspan := octrace.StartSpan(ctx, "OpenCensusSpan1")
	ocspan.SetName("span-foo")
	ocspan.SetStatus(octrace.Status{Code: 1, Message: "foo"})
	ocspan.AddAttributes(
		octrace.BoolAttribute("bool", true),
		octrace.Int64Attribute("int64", 12345),
		octrace.Float64Attribute("float64", 12.345),
		octrace.StringAttribute("string", "stringval"),
	)
	ocspan.Annotate(
		[]octrace.Attribute{octrace.StringAttribute("string", "annotateval")},
		"annotate",
	)
	ocspan.Annotatef(
		[]octrace.Attribute{
			octrace.Int64Attribute("int64", 12345),
			octrace.Float64Attribute("float64", 12.345),
		},
		"annotate%d", 67890,
	)
	ocspan.AddMessageSendEvent(123, 456, 789)
	ocspan.AddMessageReceiveEvent(246, 135, 369)
	ocspan.End()

	spans := sr.Ended()

	if len(spans) != 1 {
		t.Fatalf("Got %d spans, exepected %d.", len(spans), 1)
	}
	s := spans[0]

	if s.Name() != "span-foo" {
		t.Errorf("Got name %v, expected span-foo", s.Name())
	}

	if s.Status().Code != codes.Error {
		t.Errorf("Got code %v, expected %v", s.Status().Code, codes.Error)
	}

	if s.Status().Description != "foo" {
		t.Errorf("Got code %v, expected foo", s.Status().Description)
	}

	attrs := attrsMap(s.Attributes())
	if v := attrs[attribute.Key("bool")]; !v.AsBool() {
		t.Errorf("Got attributes[bool] %v, expected true", v.AsBool())
	}
	if v := attrs[attribute.Key("int64")]; v.AsInt64() != 12345 {
		t.Errorf("Got attributes[int64] %v, expected 12345", v.AsInt64())
	}
	if v := attrs[attribute.Key("float64")]; v.AsFloat64() != 12.345 {
		t.Errorf("Got attributes[float64] %v, expected 12.345", v.AsFloat64())
	}
	if v := attrs[attribute.Key("string")]; v.AsString() != "stringval" {
		t.Errorf("Got attributes[string] %v, expected stringval", v.AsString())
	}

	if len(s.Events()) != 4 {
		t.Fatalf("Got len(events) = %v, expected 4", len(s.Events()))
	}
	annotateEvent := s.Events()[0]
	aeAttrs := attrsMap(annotateEvent.Attributes)
	annotatefEvent := s.Events()[1]
	afeAttrs := attrsMap(annotatefEvent.Attributes)
	sendEvent := s.Events()[2]
	receiveEvent := s.Events()[3]
	if v := aeAttrs[attribute.Key("string")]; v.AsString() != "annotateval" {
		t.Errorf("Got annotateEvent.Attributes[string] = %v, expected annotateval", v.AsString())
	}
	if annotateEvent.Name != "annotate" {
		t.Errorf("Got annotateEvent.Name = %v, expected annotate", annotateEvent.Name)
	}
	if v := afeAttrs[attribute.Key("int64")]; v.AsInt64() != 12345 {
		t.Errorf("Got annotatefEvent.Attributes[int64] = %v, expected 12345", v.AsInt64())
	}
	if v := afeAttrs[attribute.Key("float64")]; v.AsFloat64() != 12.345 {
		t.Errorf("Got annotatefEvent.Attributes[float64] = %v, expected 12.345", v.AsFloat64())
	}
	if annotatefEvent.Name != "annotate67890" {
		t.Errorf("Got annotatefEvent.Name = %v, expected annotate67890", annotatefEvent.Name)
	}
	if v := aeAttrs[attribute.Key("string")]; v.AsString() != "annotateval" {
		t.Errorf("Got annotateEvent.Attributes[string] = %v, expected annotateval", v.AsString())
	}
	seAttrs := attrsMap(sendEvent.Attributes)
	reAttrs := attrsMap(receiveEvent.Attributes)
	if sendEvent.Name != internal.MessageSendEvent {
		t.Errorf("Got sendEvent.Name = %v, expected message send", sendEvent.Name)
	}
	if v := seAttrs[internal.UncompressedKey]; v.AsInt64() != 456 {
		t.Errorf("Got sendEvent.Attributes[uncompressedKey] = %v, expected 456", v.AsInt64())
	}
	if v := seAttrs[internal.CompressedKey]; v.AsInt64() != 789 {
		t.Errorf("Got sendEvent.Attributes[compressedKey] = %v, expected 789", v.AsInt64())
	}
	if receiveEvent.Name != internal.MessageReceiveEvent {
		t.Errorf("Got receiveEvent.Name = %v, expected message receive", receiveEvent.Name)
	}
	if v := reAttrs[internal.UncompressedKey]; v.AsInt64() != 135 {
		t.Errorf("Got receiveEvent.Attributes[uncompressedKey] = %v, expected 135", v.AsInt64())
	}
	if v := reAttrs[internal.CompressedKey]; v.AsInt64() != 369 {
		t.Errorf("Got receiveEvent.Attributes[compressedKey] = %v, expected 369", v.AsInt64())
	}
}


text:
#include <rte_memory.h>

#include "dpaax_iova_table.h"
#include "dpaax_logs.h"

/* Global table reference */
struct dpaax_iova_table *dpaax_iova_table_p;

static int dpaax_handle_memevents(void);

/* A structure representing the device-tree node available in /proc/device-tree.
 */
struct reg_node {
	phys_addr_t addr;
	size_t len;
};

/* A ntohll equivalent routine
 * XXX: This is only applicable for 64 bit environment.
 */
static void
rotate_8(unsigned char *arr)
{
	uint32_t temp;
	uint32_t *first_half;
	uint32_t *second_half;

	first_half = (uint32_t *)(arr);
	second_half = (uint32_t *)(arr + 4);

	temp = *first_half;
	*first_half = *second_half;
	*second_half = temp;

	*first_half = ntohl(*first_half);
	*second_half = ntohl(*second_half);
}

/* read_memory_nodes
 * Memory layout for DPAAx platforms (LS1043, LS1046, LS1088, LS2088, LX2160)
 * are populated by Uboot and available in device tree:
 * /proc/device-tree/memory@<address>/reg <= register.
 * Entries are of the form:
 *  (<8 byte start addr><8 byte length>)(..more similar blocks of start,len>)..
 *
 * @param count
 *    OUT populate number of entries found in memory node
 * @return
 *    Pointer to array of reg_node elements, count size
 */
static struct reg_node *
read_memory_node(unsigned int *count)
{
	int fd, ret, i;
	unsigned int j;
	glob_t result = {0};
	struct stat statbuf = {0};
	char file_data[MEM_NODE_FILE_LEN];
	struct reg_node *nodes = NULL;

	*count = 0;

	ret = glob(MEM_NODE_PATH_GLOB, 0, NULL, &result);
	if (ret != 0)
		ret = glob(MEM_NODE_PATH_GLOB_VM, 0, NULL, &result);

	if (ret != 0) {
		DPAAX_DEBUG("Unable to glob device-tree memory node (err: %d)",
			ret);
		goto out;
	}

	if (result.gl_pathc != 1) {
		/* Either more than one memory@<addr> node found, or none.
		 * In either case, cannot work ahead.
		 */
		DPAAX_DEBUG("Found (%zu) entries in device-tree. Not supported!",
			    result.gl_pathc);
		goto out;
	}

	DPAAX_DEBUG("Opening and parsing device-tree node: (%s)",
		    result.gl_pathv[0]);
	fd = open(result.gl_pathv[0], O_RDONLY);
	if (fd < 0) {
		DPAAX_DEBUG("Unable to open the device-tree node: (%s)(fd=%d)",
			    MEM_NODE_PATH_GLOB, fd);
		goto cleanup;
	}

	/* Stat to get the file size */
	ret = fstat(fd, &statbuf);
	if (ret != 0) {
		DPAAX_DEBUG("Unable to get device-tree memory node size.");
		goto cleanup;
	}

	DPAAX_DEBUG("Size of device-tree mem node: %" PRIu64, statbuf.st_size);
	if (statbuf.st_size > MEM_NODE_FILE_LEN) {
		DPAAX_DEBUG("More memory nodes available than assumed.");
		DPAAX_DEBUG("System may not work properly!");
	}

	ret = read(fd, file_data, statbuf.st_size > MEM_NODE_FILE_LEN ?
				  MEM_NODE_FILE_LEN : statbuf.st_size);
	if (ret <= 0) {
		DPAAX_DEBUG("Unable to read device-tree memory node: (%d)",
			    ret);
		goto cleanup;
	}

	/* The reg node should be multiple of 16 bytes, 8 bytes each for addr
	 * and len.
	 */
	*count = (statbuf.st_size / 16);
	if ((*count) <= 0 || (statbuf.st_size % 16 != 0)) {
		DPAAX_DEBUG("Invalid memory node values or count. (size=%" PRIu64 ")",
			    statbuf.st_size);
		goto cleanup;
	}

	/* each entry is of 16 bytes, and size/16 is total count of entries */
	nodes = malloc(sizeof(struct reg_node) * (*count));
	if (!nodes) {
		DPAAX_DEBUG("Failure in allocating working memory.");
		goto cleanup;
	}
	memset(nodes, 0, sizeof(struct reg_node) * (*count));

	for (i = 0, j = 0; i < (statbuf.st_size) && j < (*count); i += 16, j++) {
		memcpy(&nodes[j], file_data + i, 16);
		/* Rotate (ntohl) each 8 byte entry */
		rotate_8((unsigned char *)(&(nodes[j].addr)));
		rotate_8((unsigned char *)(&(nodes[j].len)));
	}

	DPAAX_DEBUG("Device-tree memory node data:");
	do {
		DPAAX_DEBUG("    %08" PRIx64 " %08zu",
			    nodes[j].addr, nodes[j].len);
	} while (--j);

cleanup:
	close(fd);
	globfree(&result);
out:
	return nodes;
}

int
dpaax_iova_table_populate(void)
{
	int ret;
	unsigned int i, node_count;
	size_t tot_memory_size, total_table_size;
	struct reg_node *nodes;
	struct dpaax_iovat_element *entry;

	/* dpaax_iova_table_p is a singleton - only one instance should be
	 * created.
	 */
	if (dpaax_iova_table_p) {
		DPAAX_DEBUG("Multiple allocation attempt for IOVA Table (%p)",
			    dpaax_iova_table_p);
		/* This can be an error case as well - some path not cleaning
		 * up table - but, for now, it is assumed that if IOVA Table
		 * pointer is valid, table is allocated.
		 */
		return 0;
	}

	nodes = read_memory_node(&node_count);
	if (nodes == NULL) {
		DPAAX_WARN("PA->VA translation not available;");
		DPAAX_WARN("Expect performance impact.");
		return -1;
	}

	tot_memory_size = 0;
	for (i = 0; i < node_count; i++)
		tot_memory_size += nodes[i].len;

	DPAAX_DEBUG("Total available PA memory size: %zu", tot_memory_size);

	/* Total table size = meta data + tot_memory_size/8 */
	total_table_size = sizeof(struct dpaax_iova_table) +
			   (sizeof(struct dpaax_iovat_element) * node_count) +
			   ((tot_memory_size / DPAAX_MEM_SPLIT) * sizeof(uint64_t));

	/* TODO: This memory doesn't need to shared but needs to be always
	 * pinned to RAM (no swap out) - using hugepage rather than malloc
	 */
	dpaax_iova_table_p = rte_zmalloc(NULL, total_table_size, 0);
	if (dpaax_iova_table_p == NULL) {
		DPAAX_WARN("Unable to allocate memory for PA->VA Table;");
		DPAAX_WARN("PA->VA translation not available;");
		DPAAX_WARN("Expect performance impact.");
		free(nodes);
		return -1;
	}

	/* Initialize table */
	dpaax_iova_table_p->count = node_count;
	entry = dpaax_iova_table_p->entries;

	DPAAX_DEBUG("IOVA Table entries: (entry start = %p)", (void *)entry);
	DPAAX_DEBUG("\t(entry),(start),(len),(next)");

	for (i = 0; i < node_count; i++) {
		/* dpaax_iova_table_p
		 * |   dpaax_iova_table_p->entries
		 * |      |
		 * |      |
		 * V      V
		 * +------+------+-------+---+----------+---------+---
		 * |iova_ |entry | entry |   | pages    | pages   |
		 * |table | 1    |  2    |...| entry 1  | entry2  |
		 * +-----'+.-----+-------+---+;---------+;--------+---
		 *         \      \          /          /
		 *          `~~~~~~|~~~~~>pages        /
		 *                  \                 /
		 *                   `~~~~~~~~~~~>pages
		 */
		entry[i].start = nodes[i].addr;
		entry[i].len = nodes[i].len;
		if (i > 0)
			entry[i].pages = entry[i-1].pages +
				((entry[i-1].len/DPAAX_MEM_SPLIT));
		else
			entry[i].pages = (uint64_t *)((unsigned char *)entry +
					 (sizeof(struct dpaax_iovat_element) *
					 node_count));

		DPAAX_DEBUG("\t(%u),(%8"PRIx64"),(%8zu),(%8p)",
			    i, entry[i].start, entry[i].len, entry[i].pages);
	}

	/* Release memory associated with nodes array - not required now */
	free(nodes);

	DPAAX_DEBUG("Adding mem-event handler");
	ret = dpaax_handle_memevents();
	if (ret) {
		DPAAX_ERR("Unable to add mem-event handler");
		DPAAX_WARN("Cases with non-buffer pool mem won't work!");
	}

	return 0;
}

void
dpaax_iova_table_depopulate(void)
{
	if (dpaax_iova_table_p == NULL)
		return;

	rte_free(dpaax_iova_table_p->entries);
	dpaax_iova_table_p = NULL;

	DPAAX_DEBUG("IOVA Table cleaned");
}

int
dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length)
{
	int found = 0;
	unsigned int i;
	size_t req_length = length, e_offset;
	struct dpaax_iovat_element *entry;
	uintptr_t align_vaddr;
	phys_addr_t align_paddr;

	if (unlikely(dpaax_iova_table_p == NULL))
		return -1;

	align_paddr = paddr & DPAAX_MEM_SPLIT_MASK;
	align_vaddr = ((uintptr_t)vaddr & DPAAX_MEM_SPLIT_MASK);

	/* Check if paddr is available in table */
	entry = dpaax_iova_table_p->entries;
	for (i = 0; i < dpaax_iova_table_p->count; i++) {
		if (align_paddr < entry[i].start) {
			/* Address lower than start, but not found in previous
			 * iteration shouldn't exist.
			 */
			DPAAX_ERR("Add: Incorrect entry for PA->VA Table"
				  "(%"PRIu64")", paddr);
			DPAAX_ERR("Add: Lowest address: %"PRIu64"",
				  entry[i].start);
			return -1;
		}

		if (align_paddr > (entry[i].start + entry[i].len))
			continue;

		/* align_paddr >= start && align_paddr < (start + len) */
		found = 1;

		do {
			e_offset = ((align_paddr - entry[i].start) / DPAAX_MEM_SPLIT);
			/* TODO: Whatif something already exists at this
			 * location - is that an error? For now, ignoring the
			 * case.
			 */
			entry[i].pages[e_offset] = align_vaddr;
#ifdef RTE_COMMON_DPAAX_DEBUG
			DPAAX_DEBUG("Added: vaddr=%zu for Phy:%"PRIu64" at %zu"
				    " remaining len %zu", align_vaddr,
				    align_paddr, e_offset, req_length);
#endif
			/* Incoming request can be larger than the
			 * DPAAX_MEM_SPLIT size - in which case, multiple
			 * entries in entry->pages[] are filled up.
			 */
			if (req_length <= DPAAX_MEM_SPLIT)
				break;
			align_paddr += DPAAX_MEM_SPLIT;
			align_vaddr += DPAAX_MEM_SPLIT;
			req_length -= DPAAX_MEM_SPLIT;
		} while (1);

		break;
	}

	if (!found) {
		/* There might be case where the incoming physical address is
		 * beyond the address discovered in the memory node of
		 * device-tree. Specially if some malloc'd area is used by EAL
		 * and the memevent handlers passes that across. But, this is
		 * not necessarily an error.
		 */
		DPAAX_DEBUG("Add: Unable to find slot for vaddr:(%p),"
			    " phy(%"PRIu64")",
			    vaddr, paddr);
		return -1;
	}
#ifdef RTE_COMMON_DPAAX_DEBUG
	DPAAX_DEBUG("Add: Found slot at (%"PRIu64")[(%zu)] for vaddr:(%p),"
		    " phy(%"PRIu64"), len(%zu)", entry[i].start, e_offset,
		    vaddr, paddr, length);
#endif
	return 0;
}

/* dpaax_iova_table_dump
 * Dump the table, with its entries, on screen. Only works in Debug Mode
 * Not for weak hearted - the tables can get quite large
 */
void
dpaax_iova_table_dump(void)
{
	unsigned int i, j;
	struct dpaax_iovat_element *entry;

	/* In case DEBUG is not enabled, some 'if' conditions might misbehave
	 * as they have nothing else in them  except a DPAAX_DEBUG() which if
	 * tuned out would leave 'if' naked.
	 */
	if (rte_log_get_global_level() < RTE_LOG_DEBUG) {
		DPAAX_ERR("Set log level to Debug for PA->Table dump!");
		return;
	}

	DPAAX_DEBUG(" === Start of PA->VA Translation Table ===");
	if (dpaax_iova_table_p == NULL) {
		DPAAX_DEBUG("\tNULL");
		return;
	}

	entry = dpaax_iova_table_p->entries;
	for (i = 0; i < dpaax_iova_table_p->count; i++) {
		DPAAX_DEBUG("\t(%16i),(%16"PRIu64"),(%16zu),(%16p)",
			    i, entry[i].start, entry[i].len, entry[i].pages);
		DPAAX_DEBUG("\t\t          (PA),          (VA)");
		for (j = 0; j < (entry->len/DPAAX_MEM_SPLIT); j++) {
			if (entry[i].pages[j] == 0)
				continue;
			DPAAX_DEBUG("\t\t(%16"PRIx64"),(%16"PRIx64")",
				    (entry[i].start + (j * sizeof(uint64_t))),
				    entry[i].pages[j]);
		}
	}
	DPAAX_DEBUG(" === End of PA->VA Translation Table ===");
}

static void
dpaax_memevent_cb(enum rte_mem_event type, const void *addr, size_t len,
		  void *arg __rte_unused)
{
	struct rte_memseg_list *msl;
	struct rte_memseg *ms;
	size_t cur_len = 0, map_len = 0;
	phys_addr_t phys_addr;
	void *virt_addr;
	int ret;

	DPAAX_DEBUG("Called with addr=%p, len=%zu", addr, len);

	msl = rte_mem_virt2memseg_list(addr);

	while (cur_len < len) {
		const void *va = RTE_PTR_ADD(addr, cur_len);

		ms = rte_mem_virt2memseg(va, msl);
		phys_addr = rte_mem_virt2phy(ms->addr);
		virt_addr = ms->addr;
		map_len = ms->len;
#ifdef RTE_COMMON_DPAAX_DEBUG
		DPAAX_DEBUG("Request for %s, va=%p, virt_addr=%p,"
			    "iova=%"PRIu64", map_len=%zu",
			    type == RTE_MEM_EVENT_ALLOC ?
			    "alloc" : "dealloc",
			    va, virt_addr, phys_addr, map_len);
#endif
		if (type == RTE_MEM_EVENT_ALLOC)
			ret = dpaax_iova_table_update(phys_addr, virt_addr,
						      map_len);
		else
			/* In case of mem_events for MEM_EVENT_FREE, complete
			 * hugepage is released and its PA entry is set to 0.
			 */
			ret = dpaax_iova_table_update(phys_addr, 0, map_len);

		if (ret != 0) {
			DPAAX_DEBUG("PA-Table entry update failed. "
				    "Map=%d, addr=%p, len=%zu, err:(%d)",
				    type, va, map_len, ret);
			return;
		}

		cur_len += map_len;
	}
}

static int
dpaax_memevent_walk_memsegs(const struct rte_memseg_list *msl __rte_unused,
			    const struct rte_memseg *ms, size_t len,
			    void *arg __rte_unused)
{
	DPAAX_DEBUG("Walking for %p (pa=%"PRIu64") and len %zu",
		    ms->addr, ms->iova, len);
	dpaax_iova_table_update(rte_mem_virt2phy(ms->addr), ms->addr, len);
	return 0;
}

static int
dpaax_handle_memevents(void)
{
	/* First, walk through all memsegs and pin them, before installing
	 * handler. This assures that all memseg which have already been
	 * identified/allocated by EAL, are already part of PA->VA Table. This
	 * is especially for cases where application allocates memory before
	 * the EAL or this is an externally allocated memory passed to EAL.
	 */
	rte_memseg_contig_walk_thread_unsafe(dpaax_memevent_walk_memsegs, NULL);

	return rte_mem_event_callback_register("dpaax_memevents_cb",
					       dpaax_memevent_cb, NULL);
}

RTE_LOG_REGISTER_DEFAULT(dpaax_logger, ERR);


text:
package org.springframework.data.solr.repository.query;

import java.lang.reflect.Method;
import java.util.List;

import org.springframework.core.MethodParameter;
import org.springframework.data.repository.query.Parameters;

/**
 * @author Christoph Strobl
 */
public class SolrParameters extends Parameters<SolrParameters, SolrParameter> {

	public SolrParameters(Method method) {
		super(method);
	}

	public SolrParameters(List<SolrParameter> parameters) {
		super(parameters);
	}

	@Override
	protected SolrParameter createParameter(MethodParameter parameter) {
		return new SolrParameter(parameter);
	}

	@Override
	protected SolrParameters createFrom(List<SolrParameter> parameters) {
		return new SolrParameters(parameters);
	}

}


text:
<?php
use maddoger\admin\widgets\Alerts;
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \maddoger\admin\models\LoginForm */

$this->title = Yii::t('maddoger/admin', 'Administrator registration');
$this->params['bodyClass'] = 'bg-black';

?>

    <?= Alerts::widget() ?>

<?= $this->title ?>

    <?php $form = ActiveForm::begin([
        'fieldConfig' => [
            'template' => "{input}\n{hint}\n{error}\n",
        ],
        'options' => [
            'autocomplete' => 'off',
        ],
    ]) ?>

        <?= $form->field($model, 'username')->textInput(['placeholder' => $model->getAttributeLabel('username')]); ?>
        <?= $form->field($model, 'email')->textInput(['placeholder' => $model->getAttributeLabel('email')]); ?>
        <?= $form->field($model, 'real_name')->textInput(['placeholder' => $model->getAttributeLabel('real_name'), 'autocomplete' => 'off']); ?>
        <?= $form->field($model, 'password')->passwordInput(['placeholder' => $model->getAttributeLabel('password'), 'autocomplete' => 'off']); ?>

        <?= Html::submitButton(Yii::t('maddoger/admin', 'Sign up'), ['class' => 'btn bg-olive btn-block']) ?>

    <?php ActiveForm::end() ?>


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<title>Icdio内部分享平台管理</title>
	<link rel="stylesheet" type="text/css" href="../css/ManagerIndex.css">

				活动通知

添加

				首页 上一页
				/ 下一页
				尾页

				技术分享

添加

				首页 上一页
				/ 下一页
				尾页

退出

				添加技术分享

*标题

					<input type="text" id="teyTitle" class="addInput"></input>

*内容

					<textarea class="addTextarea" id="teyContent"></textarea>

				<input type="file" id="teyFile" class="addFile" value="附件上传"/>

附件上传

<button class="addBt" onclick="submitTechnology()">发布</button>

<button class="addBt" onclick="closeTechnology()">取消</button>

				添加活动通知

*标题

					<input type="text" id="actTitle" class="addInput"></input>

*内容

					<textarea class="addTextarea2" id="actContent"></textarea>

*时间

					<input id="actTime" type="text" class="addInput" onclick="laydate({elem: '#actTime'});"></input>

*地点

					<input type="text" id="actPlace" class="addInput"></input>

*类型

					<select id="actType" class="addSelect">
						<option>请选择</option>
						<option>辩论会</option>
						<option>演讲</option>
						<option>放假通知</option>
						<option>座谈会</option>
						<option>娱乐活动</option>
						<option>体育活动</option>
					</select>

<button class="addBt" onclick="submitActive()">发布</button>

<button class="addBt" onclick="closeActive()">取消</button>

			<button style="float: right;" onclick="goWhere('BackManagement')">进入管理页面</button>


text:
@implementation YWLocation
static YWLocation * location = nil;

+ (instancetype)shareLocation{

    return [[self alloc]init];
}

+ (instancetype)allocWithZone:(struct _NSZone *)zone{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        location = [super allocWithZone:zone];
        [YWLocation getDataFromDefault];
    });
    return location;
}

+ (void)saveLat:(CGFloat)lat{
    [KUSERDEFAULT setObject:[NSString stringWithFormat:@"%f",lat] forKey:LOCATION_LAT];
    location.coordinate = (CLLocationCoordinate2D){lat,location.lon};
}
+ (void)saveLon:(CGFloat)lon{
    [KUSERDEFAULT setObject:[NSString stringWithFormat:@"%f",lon] forKey:LOCATION_LON];
    location.coordinate = (CLLocationCoordinate2D){location.lat,lon};
}

+ (void)getDataFromDefault{
    NSString * location_lonDefault = [KUSERDEFAULT valueForKey:LOCATION_LON];
    NSString * location_latDefault = [KUSERDEFAULT valueForKey:LOCATION_LAT];
    if (!location_latDefault) {
        location.lat = 24.88f;
        location.lon = 118.67f;
        location.coordinate = (CLLocationCoordinate2D){location.lat,location.lon};
        return;
    }
    location.lat = [location_latDefault floatValue];
    location.lon = [location_lonDefault floatValue];
    location.coordinate = (CLLocationCoordinate2D){location.lat,location.lon};
}

+ (void)saveLocationInfoWithLat:(CGFloat)lat withLon:(CGFloat)lon{
    [KUSERDEFAULT setObject:[NSString stringWithFormat:@"%f",lat] forKey:LOCATION_LAT];
    [KUSERDEFAULT setObject:[NSString stringWithFormat:@"%f",lon] forKey:LOCATION_LON];
}

@end


text:
#ifndef NUPLAYER_STREAM_LISTENER_H_

#define NUPLAYER_STREAM_LISTENER_H_

#include "NuPlayer.h"

#include <media/IStreamSource.h>

namespace android {

struct MemoryDealer;

struct NuPlayerStreamListener : public BnStreamListener
{
    NuPlayerStreamListener(const sp<IStreamSource> &source, ALooper::handler_id targetID);
    NuPlayerStreamListener(const sp<IStreamSource> &source, ALooper::handler_id targetID, int numBuffers, int bufferSize);

    virtual void queueBuffer(size_t index, size_t size);

    virtual void issueCommand(Command cmd, bool synchronous, const sp<AMessage> &extra);

    void start();
    void stop();
    void clearBuffer();

    ssize_t read(void *data, size_t size, sp<AMessage> *extra);

private:
    enum
    {
        kNumBuffers = 16,
        kBufferSize = 4 * 1024
    };

    struct QueueEntry
    {
        bool mIsCommand;

        size_t mIndex;
        size_t mSize;
        size_t mOffset;

        Command mCommand;
        sp<AMessage> mExtra;
    };

    Mutex mLock;

    sp<IStreamSource>    mSource;
    ALooper::handler_id  mTargetID;
    sp<MemoryDealer>     mMemoryDealer;
    Vector<sp<IMemory> > mBuffers;
    List<QueueEntry>     mQueue;
    bool                 mEOS;
    bool                 mSendDataNotification;
    int                  mNumBuffers;
    int                  mBufferSize;
    size_t				 mAvailableSize;

    DISALLOW_EVIL_CONSTRUCTORS(NuPlayerStreamListener);
};

}  // namespace android

#endif // NUPLAYER_STREAM_LISTENER_H_


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <title></title>


text:
#include<iostream>
#include<string>
#include"classeInterface.h"
#include"classePersistencia.h"
#include"classeControle.h"
#include"classeIterador.h"
#include"classePessoa.h"
using namespace std;
int main()
{
		Persistencia agenda;
		Controle controleAgenda(agenda);
		Interface::menuPrincipal(controleAgenda);
}

/*
APERFEIÇOAR O PROGRAMA
1 - CLASSE PERSISTENCIA: METODO APAGAR - USAR O COMANDO RENAME, E DELETE NO CODIGO DO
METODO PARA MELHORAR E AGILIZAR O PROGRAMA. FAZ-SE ISSO NA HORA Q EH FEITA A COPIA
DO ARQUIVO, DEPOIS E SO APAGAR O ANTIGO E RENOMEAR O TEMPORARIO
2 - CLASSE PERSISTENCIA: METODO LLISTAGEM DE NOME POR LETRA - NA HORA Q EH FEITA A CONTAGEM
DE LINHAS DA AGENDA, FILTRAR APENAS OS COM OS DETEERMINADAS LETRAS, E LOGO DEPOIS
E SO CRIAR UMA AGENDA EM VETOR DO TAMANHO  DE LINHAS ENCONTRADAS...
PROCESSOS PARA AGILIZAR O PROJETO DE AGENDA EM VETOR DE PROGRAMAÇÃO II

*/


text:
#ifndef GRPC_TEST_CORE_UTIL_PORT_H
#define GRPC_TEST_CORE_UTIL_PORT_H

#ifdef __cplusplus
extern "C" {
#endif

/* pick a port number that is currently unused by either tcp or udp. return
   0 on failure. */
int grpc_pick_unused_port();
/* pick a port number that is currently unused by either tcp or udp. abort
   on failure. */
int grpc_pick_unused_port_or_die();

#ifdef __cplusplus
}
#endif

#endif  /* GRPC_TEST_CORE_UTIL_PORT_H */


text:
package jp.co.tv.excelmetaforce;

import jp.co.tv.excelmetaforce.excel.ObjectCrudData;

public final class ReadObjectCrud {
    private ReadObjectCrud() {}

    /**
     * Read Custom Object Definition from salesforce, and write to excel workbook.
     * + object definition
     * + field definition
     * + picklist definition
     *
     * @param args arguments
     */
    @SuppressWarnings({ "rawtypes", "unchecked" })
    public static void main(String... args) {
        // set read target metadata
        Class[] target = new Class[]{
            ObjectCrudData.class,
        };
        String excelFileName = RunnerHelper.getFileName(args);

        // execute target operation
        for (Class cls : target) {
            new Reader(cls, excelFileName).read();
        }
    }
}


text:
class CreateSocImpPhotos < ActiveRecord::Migration
  def change
    create_table :soc_imp_photos do |t|
      t.string :file, null: false
      t.text :caption
      t.string :user_screen_name
      t.string :user_full_name
      t.string :user_id
      t.string :service, null: false
      t.string :image_service
      t.string :post_id
      t.string :post_url
      t.boolean :approved, null: false, default: false
      t.integer :position, null: false, default: 0
      t.references :program, null: false

      t.timestamps
    end
    add_index :soc_imp_photos, :program_id
  end
end


text:
// <copyright file="Constructor_Should.cs" company="YAGNI">
// All rights reserved.
// </copyright>
// <summary>Holds unit tests of Publisher entity model constructor.</summary>

using System.Collections.Generic;
using NUnit.Framework;

namespace LibrarySystem.Models.UnitTests.PublisherTests
{
    [TestFixture]
    public class Constructor_Should
    {
        [Test]
        [Category("Models.Publisher.Constructor")]
        public void InstantiatePublisher_WhenNoArgumentsArePassed()
        {
            // Arrange
            // Act
            var publisher = new Publisher();

            // Assert
            Assert.That(publisher, Is.InstanceOf<Publisher>());
        }

        [Test]
        [Category("Models.Publisher.Constructor")]
        public void InstantiatePublisherWithIdProperty_WhenNoArgumentsArePassed()
        {
            // Arrange
            // Act
            var publisher = new Publisher();

            // Assert
            Assert.That(publisher, Has.Property("Id"));
        }

        [Test]
        [Category("Models.Publisher.Constructor")]
        public void InstantiatePublisherWithNameProperty_WhenNoArgumentsArePassed()
        {
            // Arrange
            // Act
            var publisher = new Publisher();

            // Assert
            Assert.That(publisher, Has.Property("Name"));
        }

        [Test]
        [Category("Models.Publisher.Constructor")]
        public void InstantiatePublisherWithBooksProperty_WhenNoArgumentsArePassed()
        {
            // Arrange
            // Act
            var publisher = new Publisher();

            // Assert
            Assert.That(publisher, Has.Property("Books"));
        }

        [Test]
        [Category("Models.Publisher.Constructor")]
        public void InstantiatePublisherWithJournalsProperty_WhenNoArgumentsArePassed()
        {
            // Arrange
            // Act
            var publisher = new Publisher();

            // Assert
            Assert.That(publisher, Has.Property("Journals"));
        }

        [Test]
        [Category("Models.Publisher.Constructor")]
        public void InstantiatePublisherBookCollection_WhenNoArgumentsArePassed()
        {
            // Arrange
            // Act
            var publisher = new Publisher();

            // Assert
            Assert.That(publisher.Books.Count, Is.Zero);
            Assert.That(publisher.Books, Is.TypeOf<HashSet<Book>>());
        }

        [Test]
        [Category("Models.Publisher.Constructor")]
        public void InstantiatePublisherJournalCollection_WhenNoArgumentsArePassed()
        {
            // Arrange
            // Act
            var publisher = new Publisher();

            // Assert
            Assert.That(publisher.Journals.Count, Is.Zero);
            Assert.That(publisher.Journals, Is.TypeOf<HashSet<Journal>>());
        }
    }
}


text:
using System;
using MongoDB.Bson;
using NUnit.Framework;

namespace MongoDB.Bson.Tests.Jira.CSharp595
{
    [TestFixture]
    public class CSharp595Tests
    {
        [Test]
        public void TestDoesNotThrowStackOverflowExceptionWhenConvertingToSelfType()
        {
            BsonObjectId id1 = new BsonObjectId(ObjectId.GenerateNewId());
            BsonObjectId id2 = null;
            Assert.DoesNotThrow(() =>
            {
                id2 = (BsonObjectId)((IConvertible)id1).ToType(typeof(BsonObjectId), null);
            });

            Assert.AreEqual(id1, id2);
        }

        [Test]
        public void TestDoesNotThrowStackOverflowExceptionWhenConvertingToBsonString()
        {
            BsonObjectId id1 = new BsonObjectId(ObjectId.GenerateNewId());
            BsonString id2 = null;
            Assert.DoesNotThrow(() =>
            {
                id2 = (BsonString)((IConvertible)id1).ToType(typeof(BsonString), null);
            });

            Assert.AreEqual(id1.ToString(), id2.AsString);
        }
    }
}


text:
#!/usr/bin/env python3
#  Copyright (c) 2019. Vinci Consulting Corp. All Rights Reserved.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

import argparse
import pathlib
import subprocess
import vppapigen
import os
from multiprocessing import Pool

BASE_DIR = (
    subprocess.check_output("git rev-parse --show-toplevel", shell=True)
    .strip()
    .decode()
)

src_dir_depth = 3
output_path = pathlib.Path(
    "%s/build-root/install-vpp-native/vpp/share/vpp/api/" % BASE_DIR
)
output_path_debug = pathlib.Path(
    "%s/build-root/install-vpp_debug-native/vpp/share/vpp/api/" % BASE_DIR
)

output_dir_map = {
    "plugins": "plugins",
    "vlibmemory": "core",
    "vnet": "core",
    "vlib": "core",
    "vpp": "core",
}

def api_search_globs(src_dir):
    globs = []
    for g in output_dir_map:
        globs.extend(list(src_dir.glob("%s/**/*.api" % g)))
    return globs

def api_files(src_dir):
    print("Searching '%s' for .api files." % src_dir.as_posix())
    return [x for x in api_search_globs(src_dir)]

def get_n_parallel(n_parallel):
    if n_parallel == 0:
        n_parallel = os.environ.get("MAKE_PARALLEL_JOBS", os.cpu_count())
        try:
            n_parallel = int(n_parallel)
        except ValueError:
            return os.cpu_count()
    return n_parallel or os.cpu_count()

def main():
    cliparser = argparse.ArgumentParser(description="VPP API JSON definition generator")
    cliparser.add_argument("--srcdir", action="store", default="%s/src" % BASE_DIR),
    cliparser.add_argument("--output", action="store", help="directory to store files"),
    cliparser.add_argument(
        "--parallel", type=int, default=0, help="Number of parallel processes"
    ),
    cliparser.add_argument(
        "--debug-target",
        action="store_true",
        default=False,
        help="'True' if -debug target",
    ),

    args = cliparser.parse_args()

    src_dir = pathlib.Path(args.srcdir)
    output_target = output_path_debug if args.debug_target else output_path

    if args.output:
        output_dir = pathlib.Path(args.output)
    else:
        output_dir = pathlib.Path(output_target)

    for d in output_dir_map.values():
        output_dir.joinpath(d).mkdir(exist_ok=True, parents=True)

    for f in output_dir.glob("**/*.api.json"):
        f.unlink()

    with Pool(get_n_parallel(args.parallel)) as p:
        p.map(
            vppapigen.run_kw_vppapigen,
            [
                {
                    "output": "%s/%s/%s.json"
                    % (
                        output_path,
                        output_dir_map[
                            f.as_posix().split("/")[
                                src_dir_depth + BASE_DIR.count("/") - 1
                            ]
                        ],
                        f.name,
                    ),
                    "input_file": f.as_posix(),
                    "includedir": [src_dir.as_posix()],
                    "output_module": "JSON",
                }
                for f in api_files(src_dir)
            ],
        )

    print("json files written to: %s/." % output_dir)

if __name__ == "__main__":
    main()