text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="CoreNLP-to-HTML.xsl" type="text/xsl"?>
<root>
  <document>
    <sentences>
      <sentence id="1">
        <tokens>
          <token id="1">
            <word>I</word>
            <lemma>I</lemma>
            <CharacterOffsetBegin>0</CharacterOffsetBegin>
            <CharacterOffsetEnd>1</CharacterOffsetEnd>
            <POS>PRP</POS>
          </token>
          <token id="2">
            <word>have</word>
            <lemma>have</lemma>
            <CharacterOffsetBegin>2</CharacterOffsetBegin>
            <CharacterOffsetEnd>6</CharacterOffsetEnd>
            <POS>VBP</POS>
          </token>
          <token id="3">
            <word>liked</word>
            <lemma>like</lemma>
            <CharacterOffsetBegin>7</CharacterOffsetBegin>
            <CharacterOffsetEnd>12</CharacterOffsetEnd>
            <POS>VBN</POS>
          </token>
          <token id="4">
            <word>every</word>
            <lemma>every</lemma>
            <CharacterOffsetBegin>13</CharacterOffsetBegin>
            <CharacterOffsetEnd>18</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="5">
            <word>flavour</word>
            <lemma>flavour</lemma>
            <CharacterOffsetBegin>19</CharacterOffsetBegin>
            <CharacterOffsetEnd>26</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="6">
            <word>of</word>
            <lemma>of</lemma>
            <CharacterOffsetBegin>27</CharacterOffsetBegin>
            <CharacterOffsetEnd>29</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="7">
            <word>Harney</word>
            <lemma>Harney</lemma>
            <CharacterOffsetBegin>30</CharacterOffsetBegin>
            <CharacterOffsetEnd>36</CharacterOffsetEnd>
            <POS>NNP</POS>
          </token>
          <token id="8">
            <word>&</word>
            <lemma>&</lemma>
            <CharacterOffsetBegin>37</CharacterOffsetBegin>
            <CharacterOffsetEnd>38</CharacterOffsetEnd>
            <POS>CC</POS>
          </token>
          <token id="9">
            <word>Sons</word>
            <lemma>Sons</lemma>
            <CharacterOffsetBegin>39</CharacterOffsetBegin>
            <CharacterOffsetEnd>43</CharacterOffsetEnd>
            <POS>NNP</POS>
          </token>
          <token id="10">
            <word>tea</word>
            <lemma>tea</lemma>
            <CharacterOffsetBegin>44</CharacterOffsetBegin>
            <CharacterOffsetEnd>47</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="11">
            <word>that</word>
            <lemma>that</lemma>
            <CharacterOffsetBegin>48</CharacterOffsetBegin>
            <CharacterOffsetEnd>52</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="12">
            <word>I</word>
            <lemma>I</lemma>
            <CharacterOffsetBegin>53</CharacterOffsetBegin>
            <CharacterOffsetEnd>54</CharacterOffsetEnd>
            <POS>PRP</POS>
          </token>
          <token id="13">
            <word>have</word>
            <lemma>have</lemma>
            <CharacterOffsetBegin>55</CharacterOffsetBegin>
            <CharacterOffsetEnd>59</CharacterOffsetEnd>
            <POS>VBP</POS>
          </token>
          <token id="14">
            <word>tried</word>
            <lemma>try</lemma>
            <CharacterOffsetBegin>60</CharacterOffsetBegin>
            <CharacterOffsetEnd>65</CharacterOffsetEnd>
            <POS>VBN</POS>
          </token>
          <token id="15">
            <word>.</word>
            <lemma>.</lemma>
            <CharacterOffsetBegin>65</CharacterOffsetBegin>
            <CharacterOffsetEnd>66</CharacterOffsetEnd>
            <POS>.</POS>
          </token>
        </tokens>
        <parse>(ROOT (S (NP (PRP I)) (VP (VBP have) (VP (VBN liked) (NP (NP (DT every) (NN flavour)) (PP (IN of) (NP (NP (NNP Harney) (CC &) (NNP Sons)) (NN tea)))) (SBAR (IN that) (S (NP (PRP I)) (VP (VBP have) (VP (VBN tried))))))) (. .))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="3">liked</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="3">liked</governor>
            <dependent idx="1">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="3">liked</governor>
            <dependent idx="2">have</dependent>
          </dep>
          <dep type="det">
            <governor idx="5">flavour</governor>
            <dependent idx="4">every</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="3">liked</governor>
            <dependent idx="5">flavour</dependent>
          </dep>
          <dep type="prep">
            <governor idx="5">flavour</governor>
            <dependent idx="6">of</dependent>
          </dep>
          <dep type="nn">
            <governor idx="10">tea</governor>
            <dependent idx="7">Harney</dependent>
          </dep>
          <dep type="cc">
            <governor idx="7">Harney</governor>
            <dependent idx="8">&</dependent>
          </dep>
          <dep type="conj">
            <governor idx="7">Harney</governor>
            <dependent idx="9">Sons</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="6">of</governor>
            <dependent idx="10">tea</dependent>
          </dep>
          <dep type="mark">
            <governor idx="14">tried</governor>
            <dependent idx="11">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="14">tried</governor>
            <dependent idx="12">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="14">tried</governor>
            <dependent idx="13">have</dependent>
          </dep>
          <dep type="ccomp">
            <governor idx="3">liked</governor>
            <dependent idx="14">tried</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="3">liked</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="3">liked</governor>
            <dependent idx="1">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="3">liked</governor>
            <dependent idx="2">have</dependent>
          </dep>
          <dep type="det">
            <governor idx="5">flavour</governor>
            <dependent idx="4">every</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="3">liked</governor>
            <dependent idx="5">flavour</dependent>
          </dep>
          <dep type="nn">
            <governor idx="10">tea</governor>
            <dependent idx="7">Harney</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="7">Harney</governor>
            <dependent idx="9">Sons</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="5">flavour</governor>
            <dependent idx="10">tea</dependent>
          </dep>
          <dep type="mark">
            <governor idx="14">tried</governor>
            <dependent idx="11">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="14">tried</governor>
            <dependent idx="12">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="14">tried</governor>
            <dependent idx="13">have</dependent>
          </dep>
          <dep type="ccomp">
            <governor idx="3">liked</governor>
            <dependent idx="14">tried</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="3">liked</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="3">liked</governor>
            <dependent idx="1">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="3">liked</governor>
            <dependent idx="2">have</dependent>
          </dep>
          <dep type="det">
            <governor idx="5">flavour</governor>
            <dependent idx="4">every</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="3">liked</governor>
            <dependent idx="5">flavour</dependent>
          </dep>
          <dep type="nn">
            <governor idx="10">tea</governor>
            <dependent idx="7">Harney</dependent>
          </dep>
          <dep type="conj_and">
            <governor idx="7">Harney</governor>
            <dependent idx="9">Sons</dependent>
          </dep>
          <dep type="nn">
            <governor idx="10">tea</governor>
            <dependent idx="9">Sons</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="5">flavour</governor>
            <dependent idx="10">tea</dependent>
          </dep>
          <dep type="mark">
            <governor idx="14">tried</governor>
            <dependent idx="11">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="14">tried</governor>
            <dependent idx="12">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="14">tried</governor>
            <dependent idx="13">have</dependent>
          </dep>
          <dep type="ccomp">
            <governor idx="3">liked</governor>
            <dependent idx="14">tried</dependent>
          </dep>
        </dependencies>
      </sentence>
      <sentence id="2">
        <tokens>
          <token id="1">
            <word>The</word>
            <lemma>the</lemma>
            <CharacterOffsetBegin>67</CharacterOffsetBegin>
            <CharacterOffsetEnd>70</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="2">
            <word>peppermint</word>
            <lemma>peppermint</lemma>
            <CharacterOffsetBegin>71</CharacterOffsetBegin>
            <CharacterOffsetEnd>81</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="3">
            <word>is</word>
            <lemma>be</lemma>
            <CharacterOffsetBegin>82</CharacterOffsetBegin>
            <CharacterOffsetEnd>84</CharacterOffsetEnd>
            <POS>VBZ</POS>
          </token>
          <token id="4">
            <word>no</word>
            <lemma>no</lemma>
            <CharacterOffsetBegin>85</CharacterOffsetBegin>
            <CharacterOffsetEnd>87</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="5">
            <word>exception</word>
            <lemma>exception</lemma>
            <CharacterOffsetBegin>88</CharacterOffsetBegin>
            <CharacterOffsetEnd>97</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="6">
            <word>.</word>
            <lemma>.</lemma>
            <CharacterOffsetBegin>97</CharacterOffsetBegin>
            <CharacterOffsetEnd>98</CharacterOffsetEnd>
            <POS>.</POS>
          </token>
        </tokens>
        <parse>(ROOT (S (NP (DT The) (NN peppermint)) (VP (VBZ is) (NP (DT no) (NN exception))) (. .))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="5">exception</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">peppermint</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="5">exception</governor>
            <dependent idx="2">peppermint</dependent>
          </dep>
          <dep type="cop">
            <governor idx="5">exception</governor>
            <dependent idx="3">is</dependent>
          </dep>
          <dep type="det">
            <governor idx="5">exception</governor>
            <dependent idx="4">no</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="5">exception</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">peppermint</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="5">exception</governor>
            <dependent idx="2">peppermint</dependent>
          </dep>
          <dep type="cop">
            <governor idx="5">exception</governor>
            <dependent idx="3">is</dependent>
          </dep>
          <dep type="det">
            <governor idx="5">exception</governor>
            <dependent idx="4">no</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="5">exception</dependent>
          </dep>
          <dep type="det">
            <governor idx="2">peppermint</governor>
            <dependent idx="1">The</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="5">exception</governor>
            <dependent idx="2">peppermint</dependent>
          </dep>
          <dep type="cop">
            <governor idx="5">exception</governor>
            <dependent idx="3">is</dependent>
          </dep>
          <dep type="det">
            <governor idx="5">exception</governor>
            <dependent idx="4">no</dependent>
          </dep>
        </dependencies>
      </sentence>
      <sentence id="3">
        <tokens>
          <token id="1">
            <word>It</word>
            <lemma>it</lemma>
            <CharacterOffsetBegin>99</CharacterOffsetBegin>
            <CharacterOffsetEnd>101</CharacterOffsetEnd>
            <POS>PRP</POS>
          </token>
          <token id="2">
            <word>has</word>
            <lemma>have</lemma>
            <CharacterOffsetBegin>102</CharacterOffsetBegin>
            <CharacterOffsetEnd>105</CharacterOffsetEnd>
            <POS>VBZ</POS>
          </token>
          <token id="3">
            <word>a</word>
            <lemma>a</lemma>
            <CharacterOffsetBegin>106</CharacterOffsetBegin>
            <CharacterOffsetEnd>107</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="4">
            <word>very</word>
            <lemma>very</lemma>
            <CharacterOffsetBegin>108</CharacterOffsetBegin>
            <CharacterOffsetEnd>112</CharacterOffsetEnd>
            <POS>RB</POS>
          </token>
          <token id="5">
            <word>strong/rich</word>
            <lemma>strong/rich</lemma>
            <CharacterOffsetBegin>113</CharacterOffsetBegin>
            <CharacterOffsetEnd>124</CharacterOffsetEnd>
            <POS>JJ</POS>
          </token>
          <token id="6">
            <word>flavour</word>
            <lemma>flavour</lemma>
            <CharacterOffsetBegin>125</CharacterOffsetBegin>
            <CharacterOffsetEnd>132</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="7">
            <word>that</word>
            <lemma>that</lemma>
            <CharacterOffsetBegin>133</CharacterOffsetBegin>
            <CharacterOffsetEnd>137</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="8">
            <word>I</word>
            <lemma>I</lemma>
            <CharacterOffsetBegin>138</CharacterOffsetBegin>
            <CharacterOffsetEnd>139</CharacterOffsetEnd>
            <POS>PRP</POS>
          </token>
          <token id="9">
            <word>have</word>
            <lemma>have</lemma>
            <CharacterOffsetBegin>140</CharacterOffsetBegin>
            <CharacterOffsetEnd>144</CharacterOffsetEnd>
            <POS>VBP</POS>
          </token>
          <token id="10">
            <word>found</word>
            <lemma>find</lemma>
            <CharacterOffsetBegin>145</CharacterOffsetBegin>
            <CharacterOffsetEnd>150</CharacterOffsetEnd>
            <POS>VBN</POS>
          </token>
          <token id="11">
            <word>to</word>
            <lemma>to</lemma>
            <CharacterOffsetBegin>151</CharacterOffsetBegin>
            <CharacterOffsetEnd>153</CharacterOffsetEnd>
            <POS>TO</POS>
          </token>
          <token id="12">
            <word>be</word>
            <lemma>be</lemma>
            <CharacterOffsetBegin>154</CharacterOffsetBegin>
            <CharacterOffsetEnd>156</CharacterOffsetEnd>
            <POS>VB</POS>
          </token>
          <token id="13">
            <word>lacking</word>
            <lemma>lack</lemma>
            <CharacterOffsetBegin>157</CharacterOffsetBegin>
            <CharacterOffsetEnd>164</CharacterOffsetEnd>
            <POS>VBG</POS>
          </token>
          <token id="14">
            <word>in</word>
            <lemma>in</lemma>
            <CharacterOffsetBegin>165</CharacterOffsetBegin>
            <CharacterOffsetEnd>167</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="15">
            <word>some</word>
            <lemma>some</lemma>
            <CharacterOffsetBegin>168</CharacterOffsetBegin>
            <CharacterOffsetEnd>172</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="16">
            <word>of</word>
            <lemma>of</lemma>
            <CharacterOffsetBegin>173</CharacterOffsetBegin>
            <CharacterOffsetEnd>175</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="17">
            <word>the</word>
            <lemma>the</lemma>
            <CharacterOffsetBegin>176</CharacterOffsetBegin>
            <CharacterOffsetEnd>179</CharacterOffsetEnd>
            <POS>DT</POS>
          </token>
          <token id="18">
            <word>lesser</word>
            <lemma>lesser</lemma>
            <CharacterOffsetBegin>180</CharacterOffsetBegin>
            <CharacterOffsetEnd>186</CharacterOffsetEnd>
            <POS>JJR</POS>
          </token>
          <token id="19">
            <word>brands</word>
            <lemma>brand</lemma>
            <CharacterOffsetBegin>187</CharacterOffsetBegin>
            <CharacterOffsetEnd>193</CharacterOffsetEnd>
            <POS>NNS</POS>
          </token>
          <token id="20">
            <word>of</word>
            <lemma>of</lemma>
            <CharacterOffsetBegin>194</CharacterOffsetBegin>
            <CharacterOffsetEnd>196</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="21">
            <word>peppermint</word>
            <lemma>peppermint</lemma>
            <CharacterOffsetBegin>197</CharacterOffsetBegin>
            <CharacterOffsetEnd>207</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="22">
            <word>tea</word>
            <lemma>tea</lemma>
            <CharacterOffsetBegin>208</CharacterOffsetBegin>
            <CharacterOffsetEnd>211</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="23">
            <word>that</word>
            <lemma>that</lemma>
            <CharacterOffsetBegin>212</CharacterOffsetBegin>
            <CharacterOffsetEnd>216</CharacterOffsetEnd>
            <POS>IN</POS>
          </token>
          <token id="24">
            <word>I</word>
            <lemma>I</lemma>
            <CharacterOffsetBegin>217</CharacterOffsetBegin>
            <CharacterOffsetEnd>218</CharacterOffsetEnd>
            <POS>PRP</POS>
          </token>
          <token id="25">
            <word>have</word>
            <lemma>have</lemma>
            <CharacterOffsetBegin>219</CharacterOffsetBegin>
            <CharacterOffsetEnd>223</CharacterOffsetEnd>
            <POS>VBP</POS>
          </token>
          <token id="26">
            <word>encountered</word>
            <lemma>encounter</lemma>
            <CharacterOffsetBegin>224</CharacterOffsetBegin>
            <CharacterOffsetEnd>235</CharacterOffsetEnd>
            <POS>VBN</POS>
          </token>
          <token id="27">
            <word>.</word>
            <lemma>.</lemma>
            <CharacterOffsetBegin>235</CharacterOffsetBegin>
            <CharacterOffsetEnd>236</CharacterOffsetEnd>
            <POS>.</POS>
          </token>
        </tokens>
        <parse>(ROOT (S (NP (PRP It)) (VP (VBZ has) (NP (NP (DT a) (ADJP (RB very) (JJ strong/rich)) (NN flavour)) (SBAR (IN that) (S (NP (PRP I)) (VP (VBP have) (VP (VBN found) (S (VP (TO to) (VP (VB be) (VP (VBG lacking) (PP (IN in) (NP (NP (DT some)) (PP (IN of) (NP (NP (DT the) (JJR lesser) (NNS brands)) (PP (IN of) (NP (NN peppermint) (NN tea))))))) (SBAR (IN that) (S (NP (PRP I)) (VP (VBP have) (VP (VBN encountered))))))))))))))) (. .))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">has</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="2">has</governor>
            <dependent idx="1">It</dependent>
          </dep>
          <dep type="det">
            <governor idx="6">flavour</governor>
            <dependent idx="3">a</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="5">strong/rich</governor>
            <dependent idx="4">very</dependent>
          </dep>
          <dep type="amod">
            <governor idx="6">flavour</governor>
            <dependent idx="5">strong/rich</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="2">has</governor>
            <dependent idx="6">flavour</dependent>
          </dep>
          <dep type="mark">
            <governor idx="10">found</governor>
            <dependent idx="7">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="10">found</governor>
            <dependent idx="8">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="10">found</governor>
            <dependent idx="9">have</dependent>
          </dep>
          <dep type="dep">
            <governor idx="6">flavour</governor>
            <dependent idx="10">found</dependent>
          </dep>
          <dep type="aux">
            <governor idx="13">lacking</governor>
            <dependent idx="11">to</dependent>
          </dep>
          <dep type="aux">
            <governor idx="13">lacking</governor>
            <dependent idx="12">be</dependent>
          </dep>
          <dep type="xcomp">
            <governor idx="10">found</governor>
            <dependent idx="13">lacking</dependent>
          </dep>
          <dep type="prep">
            <governor idx="13">lacking</governor>
            <dependent idx="14">in</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="14">in</governor>
            <dependent idx="15">some</dependent>
          </dep>
          <dep type="prep">
            <governor idx="15">some</governor>
            <dependent idx="16">of</dependent>
          </dep>
          <dep type="det">
            <governor idx="19">brands</governor>
            <dependent idx="17">the</dependent>
          </dep>
          <dep type="amod">
            <governor idx="19">brands</governor>
            <dependent idx="18">lesser</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="16">of</governor>
            <dependent idx="19">brands</dependent>
          </dep>
          <dep type="prep">
            <governor idx="19">brands</governor>
            <dependent idx="20">of</dependent>
          </dep>
          <dep type="nn">
            <governor idx="22">tea</governor>
            <dependent idx="21">peppermint</dependent>
          </dep>
          <dep type="pobj">
            <governor idx="20">of</governor>
            <dependent idx="22">tea</dependent>
          </dep>
          <dep type="mark">
            <governor idx="26">encountered</governor>
            <dependent idx="23">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="26">encountered</governor>
            <dependent idx="24">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="26">encountered</governor>
            <dependent idx="25">have</dependent>
          </dep>
          <dep type="ccomp">
            <governor idx="13">lacking</governor>
            <dependent idx="26">encountered</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">has</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="2">has</governor>
            <dependent idx="1">It</dependent>
          </dep>
          <dep type="det">
            <governor idx="6">flavour</governor>
            <dependent idx="3">a</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="5">strong/rich</governor>
            <dependent idx="4">very</dependent>
          </dep>
          <dep type="amod">
            <governor idx="6">flavour</governor>
            <dependent idx="5">strong/rich</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="2">has</governor>
            <dependent idx="6">flavour</dependent>
          </dep>
          <dep type="mark">
            <governor idx="10">found</governor>
            <dependent idx="7">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="10">found</governor>
            <dependent idx="8">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="10">found</governor>
            <dependent idx="9">have</dependent>
          </dep>
          <dep type="dep">
            <governor idx="6">flavour</governor>
            <dependent idx="10">found</dependent>
          </dep>
          <dep type="aux">
            <governor idx="13">lacking</governor>
            <dependent idx="11">to</dependent>
          </dep>
          <dep type="aux">
            <governor idx="13">lacking</governor>
            <dependent idx="12">be</dependent>
          </dep>
          <dep type="xcomp">
            <governor idx="10">found</governor>
            <dependent idx="13">lacking</dependent>
          </dep>
          <dep type="prep_in">
            <governor idx="13">lacking</governor>
            <dependent idx="15">some</dependent>
          </dep>
          <dep type="det">
            <governor idx="19">brands</governor>
            <dependent idx="17">the</dependent>
          </dep>
          <dep type="amod">
            <governor idx="19">brands</governor>
            <dependent idx="18">lesser</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="15">some</governor>
            <dependent idx="19">brands</dependent>
          </dep>
          <dep type="nn">
            <governor idx="22">tea</governor>
            <dependent idx="21">peppermint</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="19">brands</governor>
            <dependent idx="22">tea</dependent>
          </dep>
          <dep type="mark">
            <governor idx="26">encountered</governor>
            <dependent idx="23">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="26">encountered</governor>
            <dependent idx="24">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="26">encountered</governor>
            <dependent idx="25">have</dependent>
          </dep>
          <dep type="ccomp">
            <governor idx="13">lacking</governor>
            <dependent idx="26">encountered</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="2">has</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="2">has</governor>
            <dependent idx="1">It</dependent>
          </dep>
          <dep type="det">
            <governor idx="6">flavour</governor>
            <dependent idx="3">a</dependent>
          </dep>
          <dep type="advmod">
            <governor idx="5">strong/rich</governor>
            <dependent idx="4">very</dependent>
          </dep>
          <dep type="amod">
            <governor idx="6">flavour</governor>
            <dependent idx="5">strong/rich</dependent>
          </dep>
          <dep type="dobj">
            <governor idx="2">has</governor>
            <dependent idx="6">flavour</dependent>
          </dep>
          <dep type="mark">
            <governor idx="10">found</governor>
            <dependent idx="7">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="10">found</governor>
            <dependent idx="8">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="10">found</governor>
            <dependent idx="9">have</dependent>
          </dep>
          <dep type="dep">
            <governor idx="6">flavour</governor>
            <dependent idx="10">found</dependent>
          </dep>
          <dep type="aux">
            <governor idx="13">lacking</governor>
            <dependent idx="11">to</dependent>
          </dep>
          <dep type="aux">
            <governor idx="13">lacking</governor>
            <dependent idx="12">be</dependent>
          </dep>
          <dep type="xcomp">
            <governor idx="10">found</governor>
            <dependent idx="13">lacking</dependent>
          </dep>
          <dep type="prep_in">
            <governor idx="13">lacking</governor>
            <dependent idx="15">some</dependent>
          </dep>
          <dep type="det">
            <governor idx="19">brands</governor>
            <dependent idx="17">the</dependent>
          </dep>
          <dep type="amod">
            <governor idx="19">brands</governor>
            <dependent idx="18">lesser</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="15">some</governor>
            <dependent idx="19">brands</dependent>
          </dep>
          <dep type="nn">
            <governor idx="22">tea</governor>
            <dependent idx="21">peppermint</dependent>
          </dep>
          <dep type="prep_of">
            <governor idx="19">brands</governor>
            <dependent idx="22">tea</dependent>
          </dep>
          <dep type="mark">
            <governor idx="26">encountered</governor>
            <dependent idx="23">that</dependent>
          </dep>
          <dep type="nsubj">
            <governor idx="26">encountered</governor>
            <dependent idx="24">I</dependent>
          </dep>
          <dep type="aux">
            <governor idx="26">encountered</governor>
            <dependent idx="25">have</dependent>
          </dep>
          <dep type="ccomp">
            <governor idx="13">lacking</governor>
            <dependent idx="26">encountered</dependent>
          </dep>
        </dependencies>
      </sentence>
      <sentence id="4">
        <tokens>
          <token id="1">
            <word>Blech</word>
            <lemma>Blech</lemma>
            <CharacterOffsetBegin>237</CharacterOffsetBegin>
            <CharacterOffsetEnd>242</CharacterOffsetEnd>
            <POS>NNP</POS>
          </token>
          <token id="2">
            <word>,</word>
            <lemma>,</lemma>
            <CharacterOffsetBegin>242</CharacterOffsetBegin>
            <CharacterOffsetEnd>243</CharacterOffsetEnd>
            <POS>,</POS>
          </token>
          <token id="3">
            <word>blech</word>
            <lemma>blech</lemma>
            <CharacterOffsetBegin>244</CharacterOffsetBegin>
            <CharacterOffsetEnd>249</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="4">
            <word>,</word>
            <lemma>,</lemma>
            <CharacterOffsetBegin>249</CharacterOffsetBegin>
            <CharacterOffsetEnd>250</CharacterOffsetEnd>
            <POS>,</POS>
          </token>
          <token id="5">
            <word>blech</word>
            <lemma>blech</lemma>
            <CharacterOffsetBegin>251</CharacterOffsetBegin>
            <CharacterOffsetEnd>256</CharacterOffsetEnd>
            <POS>NN</POS>
          </token>
          <token id="6">
            <word>.</word>
            <lemma>.</lemma>
            <CharacterOffsetBegin>256</CharacterOffsetBegin>
            <CharacterOffsetEnd>257</CharacterOffsetEnd>
            <POS>.</POS>
          </token>
        </tokens>
        <parse>(ROOT (NP (NP (NNP Blech)) (, ,) (NP (NP (NN blech)) (, ,) (NP (NN blech))) (. .))) </parse>
        <dependencies type="basic-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="1">Blech</dependent>
          </dep>
          <dep type="appos">
            <governor idx="1">Blech</governor>
            <dependent idx="3">blech</dependent>
          </dep>
          <dep type="appos">
            <governor idx="3">blech</governor>
            <dependent idx="5">blech</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="1">Blech</dependent>
          </dep>
          <dep type="appos">
            <governor idx="1">Blech</governor>
            <dependent idx="3">blech</dependent>
          </dep>
          <dep type="appos">
            <governor idx="3">blech</governor>
            <dependent idx="5">blech</dependent>
          </dep>
        </dependencies>
        <dependencies type="collapsed-ccprocessed-dependencies">
          <dep type="root">
            <governor idx="0">ROOT</governor>
            <dependent idx="1">Blech</dependent>
          </dep>
          <dep type="appos">
            <governor idx="1">Blech</governor>
            <dependent idx="3">blech</dependent>
          </dep>
          <dep type="appos">
            <governor idx="3">blech</governor>
            <dependent idx="5">blech</dependent>
          </dep>
        </dependencies>
      </sentence>
    </sentences>
  </document>
</root>


text:
package pkt

import (
	"net"
)

type IpHdr struct {
	Ihl        uint8  // header length (32bit words)
	Version    uint8  // version
	SrcAddr    net.IP // source address
	DstAddr    net.IP // dest address
	Protocol   uint8  // protocol
	TotLen     uint16 // total length (bytes)
	PayloadLen uint16 // payload length (bytes)
}

redpajama_set_name: RedPajamaGithub


text:
package nl.surfnet.coin.shared.cache;

import org.springframework.cache.support.NoOpCacheManager;

import net.sf.ehcache.CacheManager;

/**
 * Cache Manager that can deal with a {@link net.sf.ehcache.CacheManager} for
 * compatibility reasons, but does not actually cache anything
 *
 */
public class ConextNoOpCacheManager extends NoOpCacheManager {

  private CacheManager cacheManager;

  public void setCacheManager(net.sf.ehcache.CacheManager cacheManager) {
    this.cacheManager = cacheManager;
  }
}


text:
package com.pushtorefresh.storio.operation.internal;

import android.support.annotation.NonNull;

import com.pushtorefresh.storio.operation.PreparedOperation;

import rx.Observable;
import rx.Subscriber;

/**
 * Required to avoid problems with ClassLoader when RxJava is not in ClassPath
 * We can not use anonymous classes from RxJava directly in StorIO, ClassLoader won't be happy :(
 * <p>
 * For internal usage only!
 */
public class OnSubscribeExecuteAsBlocking<Result> implements Observable.OnSubscribe<Result> {

    @NonNull
    private final PreparedOperation<Result> preparedOperation;

    private OnSubscribeExecuteAsBlocking(@NonNull PreparedOperation<Result> preparedOperation) {
        this.preparedOperation = preparedOperation;
    }

    /**
     * Creates new instance of {@link OnSubscribeExecuteAsBlocking}
     *
     * @param preparedOperation non-null instance of {@link PreparedOperation} which will be used to provide result to subscribers
     * @param <Result> type of result of {@link PreparedOperation}
     * @return new instance of {@link OnSubscribeExecuteAsBlocking}
     */
    @NonNull
    public static <Result> Observable.OnSubscribe<Result> newInstance(@NonNull PreparedOperation<Result> preparedOperation) {
        return new OnSubscribeExecuteAsBlocking<Result>(preparedOperation);
    }

    @Override
    public void call(Subscriber<? super Result> subscriber) {
        final Result result = preparedOperation.executeAsBlocking();

        if (!subscriber.isUnsubscribed()) {
            subscriber.onNext(result);
            subscriber.onCompleted();
        }
    }
}


text:
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>SoundStatus</title>

SoundStatus()

语法

Result = SoundStatus(#Sound [, Channel])

概要

Get the current sound status.

参数

#Sound

The sound to use.

Channel (optional)

The channel to use. It's the value returned by PlaySound() when using the
#PB_Sound_MultiChannel flag.

返回值

The current sound status. 它可以是以下值之一︰

  #PB_Sound_Stopped: the sound is stopped.
  #PB_Sound_Playing: the sound is playing.
  #PB_Sound_Paused : the sound is paused.
  #PB_Sound_Unknown: the sound is in an unknown state (an error occurred when getting the state).

示例

  Procedure SelectStatus(Status)
    Select Status
      Case #PB_Sound_Stopped
        MessageRequester("Info", "The sound is stopped.")

      Case #PB_Sound_Playing
        MessageRequester("Info", "The sound is playing.")

      Case  #PB_Sound_Paused
        MessageRequester("Info", "The sound is paused.")

      Case #PB_Sound_Unknown
        MessageRequester("Info", "Status unknown.")

      Default
        MessageRequester("Info", "Status unknown.")

    EndSelect
  EndProcedure

 InitSound()           ; Initialize Sound system
 UseOGGSoundDecoder()  ; Use ogg files

 ; Loads a sound from a file
 LoadSound(0, #PB_Compiler_Home +"Examples\3D\Data\Siren.ogg")
 ; The sound is playing
 PlaySound(0, #PB_Sound_Loop, 20)
 SelectStatus(SoundStatus(0))

 PauseSound(0)
 SelectStatus(SoundStatus(0))

 ResumeSound(0)
 SelectStatus(SoundStatus(0))

 StopSound(0)
 SelectStatus(SoundStatus(0))

 FreeSound(0) ; The sound is freed
 End

已支持操作系统
所有

<- SoundPan() - Sound Index - SoundVolume() ->


text:
// Copyright 2009 the Sputnik authors.  All rights reserved.
/**
 * Function.prototype.apply can`t be used as [[create]] caller
 *
 * @path ch15/15.3/15.3.4/15.3.4.3/S15.3.4.3_A8_T3.js
 * @description Checking if creating "new Function.apply" fails
 */

try {
  obj = new Function.apply;
  $ERROR('#1: Function.prototype.apply can\'t be used as [[create]] caller');
} catch (e) {
  if (!(e instanceof TypeError)) {
  	$ERROR('#1.1: Function.prototype.apply can\'t be used as [[create]] caller');
  }
}


text:
using System;
using System.Globalization;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using PdfSharp.Pdf.Internal;

namespace PdfSharp.Pdf.IO
{
  /// <summary>
  /// Lexical analyzer for PDF files. Technically a PDF file is a stream of bytes. Some chunks
  /// of bytes represent strings in several encodings. The actual encoding depends on the
  /// context where the string is used. Therefore the bytes are 'raw encoded' into characters,
  /// i.e. a character or token read by the lexer has always character values in the range from
  /// 0 to 255.
  /// </summary>
  internal class Lexer
  {
    /// <summary>
    /// Initializes a new instance of the Lexer class.
    /// </summary>
    public Lexer(Stream pdfInputStream)
    {
      this.pdf = pdfInputStream;
      this.pdfLength = (int)pdf.Length;
      this.idxChar = 0;
      Position = 0;
    }

    /// <summary>
    /// Initializes fields after position has changed.
    /// </summary>
    void Initialize()
    {
      this.currChar = (char)this.pdf.ReadByte();
      this.nextChar = (char)this.pdf.ReadByte();
      this.token = new StringBuilder();
      //this.symbol = Symbol.None;
    }

    /// <summary>
    /// Gets or sets the position within the PDF stream.
    /// </summary>
    public int Position
    {
      get { return this.idxChar; }
      set
      {
        this.idxChar = value;
        this.pdf.Position = value;
        Initialize();
      }
    }

    /// <summary>
    /// Reads the next token and returns its type. If the token starts with a digit, the parameter
    /// testReference specifies how to treat it. If it is false, the lexer scans for a single integer.
    /// If it is true, the lexer checks if the digit is the prefix of a reference. If it is a reference,
    /// the token is set to the object ID followed by the generation number separated by a blank
    /// (the 'R' is omitted from the token).
    /// </summary>
    // /// <param name="testReference">Indicates whether to test the next token if it is a reference.</param>
    public Symbol ScanNextToken()
    {
    Again:
      this.token = new StringBuilder();
      char ch = MoveToNonWhiteSpace();
      switch (ch)
      {
        case '%':
          // Eat comments, the parser doesn't handle them
          //return this.symbol = ScanComment();
          ScanComment();
          goto Again;

        case '/':
          return this.symbol = ScanName();

        //case 'R':
        //  if (Lexer.IsWhiteSpace(this.nextChar))
        //  {
        //    ScanNextChar();
        //    return Symbol.R;
        //  }
        //  break;

        case '+': //TODO is it so easy?
        case '-':
          return this.symbol = ScanNumber();

        case '(':
          return this.symbol = ScanLiteralString();

        case '[':
          ScanNextChar();
          return this.symbol = Symbol.BeginArray;

        case ']':
          ScanNextChar();
          return this.symbol = Symbol.EndArray;

        case '<':
          if (this.nextChar == '<')
          {
            ScanNextChar();
            ScanNextChar();
            return this.symbol = Symbol.BeginDictionary;
          }
          return this.symbol = ScanHexadecimalString();

        case '>':
          if (this.nextChar == '>')
          {
            ScanNextChar();
            ScanNextChar();
            return this.symbol = Symbol.EndDictionary;
          }
          Debug.Assert(false, ">???");
          break;

        case '.':
          return this.symbol = ScanNumber();
      }
      if (Char.IsDigit(ch))
        return this.symbol = ScanNumber();

      if (Char.IsLetter(ch))
        return this.symbol = ScanKeyword();

      if (ch == Chars.EOF)
        return this.symbol = Symbol.Eof;
      Debug.Assert(false, "not implemented");
      return this.symbol = Symbol.None;
    }

    ////public Symbol ScanNextToken(bool x)
    ////{
    ////  throw new NotImplementedException();
    ////}

    /// <summary>
    /// Reads the raw content of a stream.
    /// </summary>
    public byte[] ReadStream(int length)
    {
      int pos = 0;
      // Skip new line behind �stream�
      if (this.currChar == Chars.CR)
      {
        if (this.nextChar == Chars.LF)
          pos = this.idxChar + 2;
        else
          pos = this.idxChar + 1;
      }
      else
        pos = this.idxChar + 1;

      this.pdf.Position = pos;
      byte[] bytes = new byte[length];
      int read = this.pdf.Read(bytes, 0, length);
      Debug.Assert(read == length);
      // synchronize idxChar etc.
      this.Position = pos + length;
      return bytes;
    }

    /// <summary>
    ///
    /// </summary>
    public String ReadRawString(int position, int length)
    {
      this.pdf.Position = position;
      byte[] bytes = new byte[length];
      this.pdf.Read(bytes, 0, length);
      return PdfEncoders.RawEncoding.GetString(bytes, 0, bytes.Length);
    }

    /// <summary>
    /// Scans a comment line.
    /// </summary>
    public Symbol ScanComment()
    {
      Debug.Assert(this.currChar == Chars.Percent);

      this.token = new StringBuilder();
      while (AppendAndScanNextChar() != Chars.LF) ;
      // TODO: not correct
      if (this.token.ToString().StartsWith("%%EOF"))
        return Symbol.Eof;
      return this.symbol = Symbol.Comment;
    }

    /// <summary>
    /// Scans a name.
    /// </summary>
    public Symbol ScanName()
    {
      Debug.Assert(this.currChar == Chars.Slash);

      this.token = new StringBuilder();
      while (true)
      {
        char ch = AppendAndScanNextChar();
        if (IsWhiteSpace(ch) || IsDelimiter(ch))
          return this.symbol = Symbol.Name;

        if (ch == '#')
        {
          ScanNextChar();
          char[] hex = new char[2];
          hex[0] = this.currChar;
          hex[1] = this.nextChar;
          ScanNextChar();
          // TODO Check syntax
          ch = (char)(ushort)int.Parse(new string(hex), NumberStyles.AllowHexSpecifier);
          this.currChar = ch;
        }
      }
    }

    public Symbol ScanNumber()
    {
      // I found a PDF file created with Acrobat 7 with this entry
      //   /Checksum 2996984786
      // What is this? It is neither an integer nor a real.
      // I introduced an UInteger...
      bool period = false;
      bool sign = false;
      period.GetType();
      sign.GetType();

      this.token = new StringBuilder();
      char ch = this.currChar;
      if (ch == '+' || ch == '-')
      {
        sign = true;
        this.token.Append(ch);
        ch = ScanNextChar();
      }
      while (true)
      {
        if (char.IsDigit(ch))
        {
          this.token.Append(ch);
        }
        else if (ch == '.')
        {
          if (period)
            throw new PdfReaderException("More than one period in number.");
          period = true;
          this.token.Append(ch);
        }
        else
          break;
        ch = ScanNextChar();
      }

      if (period)
        return Symbol.Real;
      long l = Int64.Parse(this.token.ToString(), CultureInfo.InvariantCulture);
      if (l >= Int32.MinValue && l <= Int32.MaxValue)
        return Symbol.Integer;
      if (l > 0 && l <= UInt32.MaxValue)
        return Symbol.UInteger;
      throw new PdfReaderException("Number exceeds integer range.");
    }

    public Symbol ScanKeyword()
    {
      this.token = new StringBuilder();
      char ch = this.currChar;
      // Scan token
      while (true)
      {
        if (char.IsLetter(ch))
        {
          this.token.Append(ch);
        }
        else
          break;
        ch = ScanNextChar();
      }

      // Check known tokens
      switch (this.token.ToString())
      {
        case "obj":
          return this.symbol = Symbol.Obj;

        case "endobj":
          return this.symbol = Symbol.EndObj;

        case "null":
          return this.symbol = Symbol.Null;

        case "true":
        case "false":
          return this.symbol = Symbol.Boolean;

        case "R":
          return this.symbol = Symbol.R;

        case "stream":
          return this.symbol = Symbol.BeginStream;

        case "endstream":
          return this.symbol = Symbol.EndStream;

        case "xref":
          return this.symbol = Symbol.XRef;

        case "trailer":
          return this.symbol = Symbol.Trailer;

        case "startxref":
          return this.symbol = Symbol.StartXRef;
      }

      // Anything else is treated as a keyword. Samples are f or n in iref.
      return this.symbol = Symbol.Keyword;
    }

    public Symbol ScanLiteralString()
    {
      Debug.Assert(this.currChar == Chars.ParenLeft);

#if DEBUG
      if (this.idxChar == 0x1b67aa)
        GetType();
#endif

      this.token = new StringBuilder();
      int parenLevel = 0;
      char ch = ScanNextChar();
      // Test UNICODE string
      if (ch == '\xFE' && this.nextChar == '\xFF')
      {
        // I'm not sure if the code is correct in any case.
        // ? Can a UNICODE character not start with ')' as hibyte
        // ? What about \# escape sequences

        // BUG: The code is not correct. I got a file containing the following sting:
        // (�����f��\r�F`:7.2.5 Acceptable daily intake \(ADI\) and other guideline levels)
        // It starts as unicode but ends as Ascii. No idea how to parse.
#if true
        //List<byte> bytes = new List<byte>();
        while (true)
        {
        SkipChar:
          switch (ch)
          {
            case '(':  // is this possible in a Unicode string?
              parenLevel++;
              break;

            case ')':
              if (parenLevel == 0)
              {
                ScanNextChar();
                return this.symbol = Symbol.String;
              }
              else
                parenLevel--;
              break;

            case '\\':
              {
                ch = ScanNextChar();
                switch (ch)
                {
                  case 'n':
                    ch = Chars.LF;
                    break;

                  case 'r':
                    ch = Chars.CR;
                    break;

                  case 't':
                    ch = Chars.HT;
                    break;

                  case 'b':
                    ch = Chars.BS;
                    break;

                  case 'f':
                    ch = Chars.FF;
                    break;

                  case '(':
                    ch = Chars.ParenLeft;
                    break;

                  case ')':
                    ch = Chars.ParenRight;
                    break;

                  case '\\':
                    ch = Chars.BackSlash;
                    break;

                  case Chars.LF:
                    ch = ScanNextChar();
                    goto SkipChar;

                  default:
                    if (Char.IsDigit(ch))
                    {
                      // Octal character code
                      Debug.Assert(ch < '8', "Illegal octal digit.");
                      int n = ch - '0';
                      if (Char.IsDigit(this.nextChar))
                      {
                        Debug.Assert(this.nextChar < '8', "Illegal octal digit.");
                        n = n * 8 + ScanNextChar() - '0';
                        if (Char.IsDigit(this.nextChar))
                        {
                          Debug.Assert(this.nextChar < '8', "Illegal octal digit.");
                          n = n * 8 + ScanNextChar() - '0';
                        }
                      }
                      ch = (char)n;
                    }
                    else
                    {
                      //TODO
                      Debug.Assert(false, "Not implemented; unknown escape character.");
                    }
                    break;
                }
                break;
              }

            // TODO ???
            //case '#':
            //  Debug.Assert(false, "Not yet implemented");
            //  break;

            default:
              break;
          }
          this.token.Append(ch);
          //chHi = ScanNextChar();
          //if (chHi == ')')
          //{
          //  ScanNextChar();
          //  return this.symbol = Symbol.String;
          //}
          //chLo = ScanNextChar();
          //ch = (char)((int)chHi * 256 + (int)chLo);
          ch = ScanNextChar();
        }
#else
        char chHi, chLo;
        ScanNextChar();
        chHi = ScanNextChar();
        if (chHi == ')')
        {
          // The empty unicode string...
          ScanNextChar();
          return this.symbol = Symbol.String;
        }
        chLo = ScanNextChar();
        ch = (char)((int)chHi * 256 + (int)chLo);
        while (true)
        {
        SkipChar:
          switch (ch)
          {
            case '(':
              parenLevel++;
              break;

            case ')':
              if (parenLevel == 0)
              {
                ScanNextChar();
                return this.symbol = Symbol.String;
              }
              else
                parenLevel--;
              break;

            case '\\':
              {
                // TODO: not sure that this is correct...
                ch = ScanNextChar();
                switch (ch)
                {
                  case 'n':
                    ch = Chars.LF;
                    break;

                  case 'r':
                    ch = Chars.CR;
                    break;

                  case 't':
                    ch = Chars.HT;
                    break;

                  case 'b':
                    ch = Chars.BS;
                    break;

                  case 'f':
                    ch = Chars.FF;
                    break;

                  case '(':
                    ch = Chars.ParenLeft;
                    break;

                  case ')':
                    ch = Chars.ParenRight;
                    break;

                  case '\\':
                    ch = Chars.BackSlash;
                    break;

                  case Chars.LF:
                    ch = ScanNextChar();
                    goto SkipChar;

                  default:
                    if (Char.IsDigit(ch))
                    {
                      // Octal character code
                      Debug.Assert(ch < '8', "Illegal octal digit.");
                      int n = ch - '0';
                      if (Char.IsDigit(this.nextChar))
                      {
                        Debug.Assert(this.nextChar < '8', "Illegal octal digit.");
                        n = n * 8 + ScanNextChar() - '0';
                        if (Char.IsDigit(this.nextChar))
                        {
                          Debug.Assert(this.nextChar < '8', "Illegal octal digit.");
                          n = n * 8 + ScanNextChar() - '0';
                        }
                      }
                      ch = (char)n;
                    }
                    else
                    {
                      //TODO
                      Debug.Assert(false, "Not implemented; unknown escape character.");
                    }
                    break;
                }
                break;
              }

            // TODO ???
            //case '#':
            //  Debug.Assert(false, "Not yet implemented");
            //  break;

            default:
              break;
          }
          this.token.Append(ch);
          chHi = ScanNextChar();
          if (chHi == ')')
          {
            ScanNextChar();
            return this.symbol = Symbol.String;
          }
          chLo = ScanNextChar();
          ch = (char)((int)chHi * 256 + (int)chLo);
        }
#endif
      }
      else
      {
        // 8-bit characters
        while (true)
        {
        SkipChar:
          switch (ch)
          {
            case '(':
              parenLevel++;
              break;

            case ')':
              if (parenLevel == 0)
              {
                ScanNextChar();
                return this.symbol = Symbol.String;
              }
              else
                parenLevel--;
              break;

            case '\\':
              {
                ch = ScanNextChar();
                switch (ch)
                {
                  case 'n':
                    ch = Chars.LF;
                    break;

                  case 'r':
                    ch = Chars.CR;
                    break;

                  case 't':
                    ch = Chars.HT;
                    break;

                  case 'b':
                    ch = Chars.BS;
                    break;

                  case 'f':
                    ch = Chars.FF;
                    break;

                  case '(':
                    ch = Chars.ParenLeft;
                    break;

                  case ')':
                    ch = Chars.ParenRight;
                    break;

                  case '\\':
                    ch = Chars.BackSlash;
                    break;

                  case Chars.LF:
                    ch = ScanNextChar();
                    goto SkipChar;

                  default:
                    if (char.IsDigit(ch))
                    {
                      // Octal character code
                      Debug.Assert(ch < '8', "Illegal octal digit.");
                      int n = ch - '0';
                      if (Char.IsDigit(this.nextChar))
                      {
                        Debug.Assert(this.nextChar < '8', "Illegal octal digit.");
                        n = n * 8 + ScanNextChar() - '0';
                        if (Char.IsDigit(this.nextChar))
                        {
                          Debug.Assert(this.nextChar < '8', "Illegal octal digit.");
                          n = n * 8 + ScanNextChar() - '0';
                        }
                      }
                      ch = (char)n;
                    }
                    else
                    {
                      //TODO
                      Debug.Assert(false, "Not implemented; unknown escape character.");
                    }
                    break;
                }
                break;
              }

            // TODO ???
            //case '#':
            //  Debug.Assert(false, "Not yet implemented");
            //  break;

            default:
              break;
          }
          this.token.Append(ch);
          ch = ScanNextChar();
        }
      }
      //      Debug.Assert(false, "Must never come here:");
    }

    public Symbol ScanHexadecimalString()
    {
      Debug.Assert(this.currChar == Chars.Less);

      this.token = new StringBuilder();
      char[] hex = new char[2];
      ScanNextChar();
      while (true)
      {
        MoveToNonWhiteSpace();
        if (this.currChar == '>')
        {
          ScanNextChar();
          break;
        }
        if (char.IsLetterOrDigit(this.currChar))
        {
          hex[0] = char.ToUpper(this.currChar);
          hex[1] = char.ToUpper(this.nextChar);
          int ch = int.Parse(new string(hex), NumberStyles.AllowHexSpecifier);
          this.token.Append(Convert.ToChar(ch));
          ScanNextChar();
          ScanNextChar();
        }
      }
      string chars = this.token.ToString();
      int count = chars.Length;
      if (count > 2 && chars[0] == (char)0xFE && chars[1] == (char)0xFF)
      {
        Debug.Assert(count % 2 == 0);
        this.token.Length = 0;
        for (int idx = 2; idx < count; idx += 2)
          this.token.Append((char)(chars[idx] * 256 + chars[idx + 1]));
      }
      return this.symbol = Symbol.HexString;
    }

    /// <summary>
    /// Move current position one character further in PDF stream.
    /// </summary>
    internal char ScanNextChar()
    {
      if (this.pdfLength <= this.idxChar)
      {
        this.currChar = Chars.EOF;
        this.nextChar = Chars.EOF;
      }
      else
      {
        this.currChar = this.nextChar;
        this.nextChar = (char)this.pdf.ReadByte();
        this.idxChar++;
        if (this.currChar == Chars.CR)
        {
          if (this.nextChar == Chars.LF)
          {
            // Treat CR LF as LF
            this.currChar = this.nextChar;
            this.nextChar = (char)this.pdf.ReadByte();
            this.idxChar++;
          }
          else
          {
            // Treat single CR as LF
            this.currChar = Chars.LF;
          }
        }
      }
      return currChar;
    }

    /// <summary>
    /// Resets the current token to the empty string.
    /// </summary>
    void ClearToken()
    {
      this.token.Length = 0;
    }

    /// <summary>
    /// Appends current character to the token and reads next one.
    /// </summary>
    internal char AppendAndScanNextChar()
    {
      token.Append(this.currChar);
      return ScanNextChar();
    }

    /// <summary>
    /// If the current character is not a white space, the function immediately returns it.
    /// Otherwise the PDF cursor is moved forward to the first non-white space or EOF.
    /// White spaces are NUL, HT, LF, FF, CR, and SP.
    /// </summary>
    public char MoveToNonWhiteSpace()
    {
      while (this.currChar != Chars.EOF)
      {
        switch (this.currChar)
        {
          case Chars.NUL:
          case Chars.HT:
          case Chars.LF:
          case Chars.FF:
          case Chars.CR:
          case Chars.SP:
            ScanNextChar();
            break;

          default:
            return currChar;
        }
      }
      return currChar;
    }

    /// <summary>
    /// Gets the current symbol.
    /// </summary>
    public Symbol Symbol
    {
      get { return this.symbol; }
      set { this.symbol = value; }
    }

    /// <summary>
    /// Gets the current token.
    /// </summary>
    internal string Token
    {
      get { return this.token.ToString(); }
    }

    /// <summary>
    /// Interprets current token as boolean literal.
    /// </summary>
    internal bool TokenToBoolean
    {
      get
      {
        Debug.Assert(this.token.ToString() == "true" || this.token.ToString() == "false");
        return this.token.ToString()[0] == 't';
      }
    }

    /// <summary>
    /// Interprets current token as integer literal.
    /// </summary>
    internal int TokenToInteger
    {
      get
      {
        //Debug.Assert(this.token.ToString().IndexOf('.') == -1);
        return Int32.Parse(this.token.ToString(), CultureInfo.InvariantCulture);
      }
    }

    /// <summary>
    /// Interprets current token as unsigned integer literal.
    /// </summary>
    internal uint TokenToUInteger
    {
      get
      {
        //Debug.Assert(this.token.ToString().IndexOf('.') == -1);
        return UInt32.Parse(this.token.ToString(), CultureInfo.InvariantCulture);
      }
    }

    /// <summary>
    /// Interpret current token as real or integer literal.
    /// </summary>
    internal double TokenToReal
    {
      get { return double.Parse(token.ToString(), CultureInfo.InvariantCulture); }
    }

    /// <summary>
    /// Indicates whether the specified character is a PDF white-space character.
    /// </summary>
    internal static bool IsWhiteSpace(char ch)
    {
      switch (ch)
      {
        case Chars.NUL:  // 0 Null
        case Chars.HT:   // 9 Tab
        case Chars.LF:   // 10 Line feed
        case Chars.FF:   // 12 Form feed
        case Chars.CR:   // 13 Carriage return
        case Chars.SP:   // 32 Space
          return true;
      }
      return false;
    }

    /// <summary>
    /// Indicates whether the specified character is a PDF delimiter character.
    /// </summary>
    internal static bool IsDelimiter(char ch)
    {
      switch (ch)
      {
        case '(':
        case ')':
        case '<':
        case '>':
        case '[':
        case ']':
        case '{':
        case '}':
        case '/':
        case '%':
          return true;
      }
      return false;
    }

    public int PdfLength
    {
      get { return this.pdfLength; }
    }

    int pdfLength;
    int idxChar;
    char currChar;
    char nextChar;
    StringBuilder token;
    Symbol symbol = Symbol.None;

    private Stream pdf;
  }
}


text:
dissolvedO2Class::dissolvedO2Class(){
}

void dissolvedO2Class::SETUP(){
  // void setup()
}

void dissolvedO2Class::DISSOLVEDO2(){
  // void loop()
}

dissolvedO2Class dissolvedO2 = dissolvedO2Class();


text:
/**
 * Provides LDAP 'Extended' operations that implement
 * {@link org.apache.directory.server.ldap.ExtendedOperationHandler}.
 *
 * @author Apache Directory Project
 */
package org.apache.directory.server.ldap.handlers.extended;


text:
require_relative '../command'

module StoryBranch
  module Commands
    # OpenIssue command is used to open the associated ticket in the browser
    class OpenIssue < StoryBranch::Command
      def initialize(options)
        super()
        @options = options
      end

      def execute(_input: $stdin, output: $stdout)
        require_relative '../main'
        sb = StoryBranch::Main.new
        res = sb.open_current_url
        output.write(res)
      end
    end
  end
end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>objective-c-sql-query-builder: <ZIMSqlDataDefinitionCommand> Protocol Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css"/>

objective-c-sql-query-builder

Main Page

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Index

Class Hierarchy

Class Members

<ZIMSqlDataDefinitionCommand> Protocol Reference

#import <ZIMSqlDataDefinitionCommand.h>

Inheritance diagram for <ZIMSqlDataDefinitionCommand>:

  <map id="<ZIMSqlDataDefinitionCommand>_map" name="<ZIMSqlDataDefinitionCommand>_map">
<area href="interface_z_i_m_sql_alter_table_statement.html" alt="ZIMSqlAlterTableStatement" shape="rect" coords="210,56,410,80"/>
<area href="interface_z_i_m_sql_create_index_statement.html" alt="ZIMSqlCreateIndexStatement" shape="rect" coords="210,112,410,136"/>
<area href="interface_z_i_m_sql_create_table_statement.html" alt="ZIMSqlCreateTableStatement" shape="rect" coords="210,168,410,192"/>
<area href="interface_z_i_m_sql_create_trigger_statement.html" alt="ZIMSqlCreateTriggerStatement" shape="rect" coords="210,224,410,248"/>
<area href="interface_z_i_m_sql_create_view_statement.html" alt="ZIMSqlCreateViewStatement" shape="rect" coords="210,280,410,304"/>
<area href="interface_z_i_m_sql_drop_index_statement.html" alt="ZIMSqlDropIndexStatement" shape="rect" coords="210,336,410,360"/>
<area href="interface_z_i_m_sql_drop_table_statement.html" alt="ZIMSqlDropTableStatement" shape="rect" coords="210,392,410,416"/>
<area href="interface_z_i_m_sql_drop_trigger_statement.html" alt="ZIMSqlDropTriggerStatement" shape="rect" coords="210,448,410,472"/>
<area href="interface_z_i_m_sql_drop_view_statement.html" alt="ZIMSqlDropViewStatement" shape="rect" coords="210,504,410,528"/>
<area href="interface_z_i_m_sql_truncate_table_statement.html" alt="ZIMSqlTruncateTableStatement" shape="rect" coords="210,560,410,584"/>
</map>

The documentation for this protocol was generated from the following file:

ZIMSqlDataDefinitionCommand.h

 All Classes Files Functions Variables Properties Defines

<address class="footer">Generated by

 1.7.4 </address>


text:
using System;
using System.IO;
using System.IO.Abstractions;
using System.Linq;
using System.Text;
using Kudu.Core.Infrastructure;
using Moq;
using Xunit;

namespace Kudu.Core.Deployment.Generator.Test
{
    public class PythonSiteEnablerTests
    {
        [Theory]
        [InlineData(false, new string[] { "requirements.txt" }, null)]
        [InlineData(true, new string[] { "requirements.txt", "app.py" }, null)]
        [InlineData(true, new string[] { "requirements.txt", "runtime.txt" }, "python-3.4.1")]
        [InlineData(false, new string[] { "requirements.txt", "runtime.txt" }, "i run all the time")]
        [InlineData(false, new string[] { "requirements.txt", "default.asp" }, null)]
        [InlineData(false, new string[] { "requirements.txt", "site.aspx" }, null)]
        [InlineData(false, new string[0], null)]
        [InlineData(false, new string[] { "index.php" }, null)]
        [InlineData(false, new string[] { "site.aspx" }, null)]
        [InlineData(false, new string[] { "site.aspx", "index2.aspx" }, null)]
        [InlineData(false, new string[] { "server.js" }, null)]
        [InlineData(false, new string[] { "app.js" }, null)]
        [InlineData(false, new string[] { "package.json" }, null)]
        public void TestLooksLikePython(bool looksLikePythonExpectedResult, string[] existingFiles, string runtimeTxtBytes)
        {
            Console.WriteLine("Testing: {0}", String.Join(", ", existingFiles));

            var directoryMock = new Mock<DirectoryBase>();
            var fileMock = new Mock<FileBase>();
            var fileSystemMock = new Mock<IFileSystem>();

            directoryMock.Setup(d => d.GetFiles("site", "*.py")).Returns(existingFiles.Where(f => f.EndsWith(".py")).ToArray());

            foreach (var existingFile in existingFiles)
            {
                fileMock.Setup(f => f.Exists("site\\" + existingFile)).Returns(true);
            }

            if (runtimeTxtBytes != null)
            {
                fileMock.Setup(f => f.Open("site\\runtime.txt", FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete)).Returns(new System.IO.MemoryStream(Encoding.ASCII.GetBytes(runtimeTxtBytes)));
            }

            fileSystemMock.Setup(f => f.Directory).Returns(directoryMock.Object);
            fileSystemMock.Setup(f => f.File).Returns(fileMock.Object);
            FileSystemHelpers.Instance = fileSystemMock.Object;

            bool looksLikePythonResult = PythonSiteEnabler.LooksLikePython("site");
            Assert.Equal(looksLikePythonExpectedResult, looksLikePythonResult);
        }
    }
}


text:
module ConfigUpdate
  class SaveAsTemplateAdmin < ::ConfigUpdate::SaveAction
    include ::ConfigUpdate::CheckIsTemplateAdmin
  end
end


text:
module ActiveSupport
  module Testing
    module Deprecation #:nodoc:
      def assert_deprecated(match = nil, &block)
        result, warnings = collect_deprecations(&block)
        assert !warnings.empty?, "Expected a deprecation warning within the block but received none"
        if match
          match = Regexp.new(Regexp.escape(match)) unless match.is_a?(Regexp)
          assert warnings.any? { |w| w =~ match }, "No deprecation warning matched #{match}: #{warnings.join(', ')}"
        end
        result
      end

      def assert_not_deprecated(&block)
        result, deprecations = collect_deprecations(&block)
        assert deprecations.empty?, "Expected no deprecation warning within the block but received #{deprecations.size}: \n  #{deprecations * "\n  "}"
        result
      end

      private
        def collect_deprecations
          old_behavior = ActiveSupport::Deprecation.behavior
          deprecations = []
          ActiveSupport::Deprecation.behavior = Proc.new do |message, callstack|
            deprecations << message
          end
          result = yield
          [result, deprecations]
        ensure
          ActiveSupport::Deprecation.behavior = old_behavior
        end
    end
  end
end

begin
  require 'test/unit/error'

  module Test
    module Unit
      class Error # :nodoc:
        # Silence warnings when reporting test errors.
        def message_with_silenced_deprecation
          ActiveSupport::Deprecation.silence do
            message_without_silenced_deprecation
          end
        end

        alias_method_chain :message, :silenced_deprecation
      end
    end
  end
rescue LoadError
  # Using miniunit, ignore.
end


text:
<?php
namespace empire\framework\tests\util;

use empire\framework\util\TypeCheck;

/**
 * Test class for TypeCheck.
 */
class TypeCheckTest extends \PHPUnit_Framework_TestCase {

	/**
	 * Provides test data for the is int test.
	 *
	 * @return array the test data
	 */
	public function isIntProvider() {
		$res = array();
		$res[] = array(12, true);
		$res[] = array("12", true);
		$res[] = array(12.2, false);
		$res[] = array("12.2", false);
		return $res;
	}

	/**
	 * Tests if a value is an integer.
	 *
	 * @dataProvider isIntProvider
	 * @covers empire\framework\util\TypeCheck::isInt
	 *
	 * @param mixed $value the value to check
	 * @param boolean $res if it is an integer
	 */
	public function testIsInt($value, $res) {
		$this->assertSame($res, TypeCheck::isInt($value));
	}

	/**
	 * Provides test data for the is float test.
	 *
	 * @return array the test data
	 */
	public function isFloatProvider() {
		$res = array();
		$res[] = array(12.2, true);
		$res[] = array("12.2", true);
		$res[] = array(12, false);
		$res[] = array("12", false);
		return $res;
	}

	/**
	 * Tests if a value is a float.
	 *
	 * @dataProvider isFloatProvider
	 * @covers empire\framework\util\TypeCheck::isFloat
	 *
	 * @param mixed $value the value to check
	 * @param boolean $res if it is an float
	 */
	public function testIsFloat($value, $res) {
		$this->assertSame($res, TypeCheck::isFloat($value));
	}

	/**
	 * Provides test data for the is bool test.
	 *
	 * @return array the test data
	 */
	public function isBoolProvider() {
		$res = array();
		$res[] = array(true, true);
		$res[] = array(false, true);
		$res[] = array("true", true);
		$res[] = array("false", true);
		$res[] = array(12, false);
		$res[] = array("12", false);
		return $res;
	}

	/**
	 * Tests if a value is a boolean.
	 *
	 * @dataProvider isBoolProvider
	 * @covers empire\framework\util\TypeCheck::isBool
	 *
	 * @param mixed $value the value to check
	 * @param boolean $res if it is an boolean
	 */
	public function testIsBool($value, $res) {
		$this->assertSame($res, TypeCheck::isBool($value));
	}

}
?>


text:
package com.example.sc.coolweather;

import android.Manifest;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.preference.PreferenceManager;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    List<String> permissionList = new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        if (ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.ACCESS_FINE_LOCATION)
                != PackageManager.PERMISSION_GRANTED) {
            permissionList.add(Manifest.permission.ACCESS_FINE_LOCATION);
        }
        if (ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.READ_PHONE_STATE)
                != PackageManager.PERMISSION_GRANTED) {
            permissionList.add(Manifest.permission.READ_PHONE_STATE);
        }
        if (ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)
                != PackageManager.PERMISSION_GRANTED) {
            permissionList.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
        }
        if (ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.SEND_SMS)
                != PackageManager.PERMISSION_GRANTED) {
            permissionList.add(Manifest.permission.SEND_SMS);
        }
        if (!permissionList.isEmpty()) {
            String[] permissions = permissionList.toArray(new String[permissionList.size()]);
            ActivityCompat.requestPermissions(MainActivity.this, permissions, 1);
        }
        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);

        if (prefs.getString("weather", null) != null) {
            Intent intent = new Intent(this, WeatherActivity.class);
            startActivity(intent);
            finish();
        }

    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
  <Resource id="StudentsDataSource" type="javax.sql.DataSource">#Mon Feb 29 21:26:30 EET 2016
jdbcDriver=org.apache.derby.jdbc.ClientDriver
password=APP
userName=APP
jdbcUrl=jdbc\:derby\://localhost\:1527/StudentsDB
</Resource>
</resources>


text:
package stroom.pipeline.errorhandler;

import stroom.util.shared.Location;
import stroom.util.shared.Severity;

/**
 * An interface to deal with all error reporting and handling during processing.
 */
public interface ErrorReceiver {
    void log(Severity severity, Location location, String elementId, String message, Throwable e);
}


text:
module AngularForm
  VERSION = '0.1.0'
end


text:
package org.pittarck.superheros.services.rest.api;

import org.pittarck.superheros.services.rest.api.model.JsonSuperhero;

import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.util.List;

@Path("superheros")
public interface SuperherosRestFacade {
    @POST
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    Response createSuperhero(JsonSuperhero jsonSuperhero, @Context UriInfo uriInfo);

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    List<JsonSuperhero> listSuperheros();

    @GET
    @Path("{name}")
    @Produces(MediaType.APPLICATION_JSON)
    Response getSuperHeroByName(@PathParam("name") String name);
}


text:
require 'byebug'
require 'simplecov'
SimpleCov.start
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'easemob'

load 'spec/test_account.rb'

require 'rspec'
RSpec.configure do |config|
  config.mock_with :rspec
  config.order = 'random'

  # Limits the available syntax to the non-monkey patched syntax that is
  # recommended. For more details, see:
  #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
  #   - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
  #   - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
  config.disable_monkey_patching!

  # This setting enables warnings. It's recommended, but in some cases may
  # be too noisy due to issues in dependencies.
  config.warnings = true

  # Allows RSpec to persist some state between runs in order to support
  # the `--only-failures` and `--next-failure` CLI options. We recommend
  # you configure your source control system to ignore this file.
  config.example_status_persistence_file_path = 'spec/examples.txt'

  config.before(:suite) do
    res = Easemob.delete_users!
    expect(res.code).to eq 200
    res = Easemob.create_user('u', 'pwd')
    expect(res.code).to eq 200
    users = (1..10).inject([]) { |a, e| a << { username: "u#{e}", password: 'pwd' } }
    res = Easemob.create_users(users)
    expect(res.code).to eq 200
    res = Easemob.create_users([{ username: 'to_delete_user', password: 'pwd' },
                                { username: 'activated_user', password: 'pwd' },
                                { username: 'deactivated_user', password: 'pwd' }])
    expect(res.code).to eq 200
    sleep 2 # must sleep to make sure easemob finish insert.

    res = Easemob.add_user_friend('u', friend_username: 'u1')
    expect(res.code).to eq 200
    res = Easemob.add_user_friend('u', friend_username: 'u2')
    expect(res.code).to eq 200
    res = Easemob.add_user_friend('u', friend_username: 'u3')
    expect(res.code).to eq 200
    res = Easemob.add_to_user_block 'u', to_block_usernames: %w(u7 u8 u9)
    expect(res.code).to eq 200
    res = Easemob.deactivate_user 'deactivated_user'
    expect(res.code).to eq 200

    # create group
    res = Easemob.create_group 'g', 'group', 'u', members: %w(u1 u2 u3 u4 u5 u10)
    expect(res.code).to eq 200
    h1 = JSON.parse res.body.to_s
    expect(h1['data']['groupid']).not_to be nil
    $easemob_rspec_group_g_id = h1['data']['groupid']
    res = Easemob.create_group 'empty_group', 'empty group', 'u'
    expect(res.code).to eq 200
    h2 = JSON.parse res.body.to_s
    expect(h2['data']['groupid']).not_to be nil
    $easemob_rspec_empty_group_id = h2['data']['groupid']
    res = Easemob.create_group 'to_delete_group', 'to delete group', 'u'
    expect(res.code).to eq 200
    h3 = JSON.parse res.body.to_s
    expect(h3['data']['groupid']).not_to be nil
    $easemob_rspec_to_delete_group_id = h3['data']['groupid']
    res = Easemob.create_group 'newowner_group', 'new owner group', 'u', members: %w(u1)
    expect(res.code).to eq 200
    h4 = JSON.parse res.body.to_s
    expect(h4['data']['groupid']).not_to be nil
    $easemob_rspec_newowner_group_id = h4['data']['groupid']
    res = Easemob.create_group 'to_unblock_group', 'need to unblock group', 'u', members: %w(u1 u2 u3 u4 u5)
    expect(res.code).to eq 200
    h5 = JSON.parse res.body.to_s
    expect(h5['data']['groupid']).not_to be nil
    $easemob_rspec_to_unblock_group_id = h5['data']['groupid']
    res = Easemob.add_to_group_block $easemob_rspec_to_unblock_group_id, to_block_usernames: %w(u3 u4 u5)
    expect(res.code).to eq 200

    # create chatroom
    res = Easemob.create_chatroom 'c', 'chatroom', 'u', members: %w(u1 u2 u3 u4 u5)
    expect(res.code).to eq 200
    h7 = JSON.parse res.body.to_s
    expect(h7['data']['id']).not_to be nil
    $easemob_rspec_chatroom_c_id = h7['data']['id']

    res = Easemob.create_chatroom 'to_delete_chatroom', 'to delete chatroom', 'u'
    expect(res.code).to eq 200
    h9 = JSON.parse res.body.to_s
    expect(h9['data']['id']).not_to be nil
    $easemob_rspec_to_delete_chatroom_id = h9['data']['id']

    # create chatfile
    res = Easemob.upload_chatfile('spec/easemob_logo.png')
    expect(res.code).to eq 200
    h10 = JSON.parse res.body.to_s
    expect(h10['entities'][0]['type']).to eq 'chatfile'
    $easemob_rspec_easemob_logo_uuid = h10['entities'][0]['uuid']
    $easemob_rspec_easemob_logo_share_secret = h10['entities'][0]['share-secret']

    # message_to u
    res = Easemob.message_to 'u', text: 'Greeting!', from: 'u1'
    expect(res.code).to eq 200
    h11 = JSON.parse res.body.to_s
    expect(h11['data']).not_to be nil
    expect(h11['data']['u']).to eq 'success'

    # get just created message id
    res = Easemob.chatmessages(after: Time.now.to_i - 30)
    expect(res.code).to eq 200
    h12 = JSON.parse res.body.to_s
    expect(h12['entities'].count).to be >= 1
    $easemob_rspec_greeting_msg_id = h12['entities'][0]['msg_id']
  end
end


text:
var express = require("express");
var bodyParser = require("body-parser");
var path = require("path");
var app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, "public")));
app.get("/showname", function(req, res) {
    res.send("你的名子是:" + req.query.name);
});
app.post("/showname", function(req, res) {
    res.send("你的名子是:" + req.body.name + "(POST)");
});
app.listen(process.env.PORT || 3000);