text:
7" y="7.62" drill="0.9652"/>
<pad name="A22/DAC1" x="10.16" y="7.62" drill="0.9652"/>
<pad name="VUSB" x="-25.4" y="5.08" drill="0.9652"/>
<pad name="AREF" x="-20.32" y="5.08" drill="0.9652"/>
<pad name="A10" x="-17.78" y="5.08" drill="0.9652"/>
<pad name="A11" x="-15.24" y="5.08" drill="0.9652"/>
<wire x1="-29.21" y1="8.89" x2="31.75" y2="8.89" width="0.3048" layer="21"/>
<wire x1="31.75" y1="-8.89" x2="-29.21" y2="-8.89" width="0.3048" layer="21"/>
<wire x1="8.636" y1="-6.35" x2="-3.556" y2="-6.35" width="0.3048" layer="21"/>
<wire x1="-3.556" y1="-6.35" x2="-3.81" y2="-6.096" width="0.3048" layer="21" curve="-90"/>
<wire x1="-3.81" y1="-6.096" x2="-3.81" y2="6.096" width="0.3048" layer="21"/>
<wire x1="-3.81" y1="6.096" x2="-3.556" y2="6.35" width="0.3048" layer="21" curve="-90"/>
<wire x1="-3.556" y1="6.35" x2="8.636" y2="6.35" width="0.3048" layer="21"/>
<wire x1="8.636" y1="6.35" x2="8.89" y2="6.096" width="0.3048" layer="21" curve="-90"/>
<wire x1="8.89" y1="6.096" x2="8.89" y2="-6.096" width="0.3048" layer="21"/>
<wire x1="8.89" y1="-6.096" x2="8.636" y2="-6.35" width="0.3048" layer="21" curve="-90"/>
<wire x1="31.75" y1="8.89" x2="31.75" y2="-8.89" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="3.81" x2="-27.305" y2="3.81" width="0.3048" layer="21"/>
<wire x1="-27.305" y1="3.81" x2="-28.575" y2="3.81" width="0.3048" layer="21"/>
<wire x1="-28.575" y1="3.81" x2="-29.21" y2="3.81" width="0.3048" layer="21"/>
<wire x1="-29.21" y1="3.81" x2="-30.48" y2="3.81" width="0.3048" layer="21"/>
<wire x1="-30.48" y1="3.81" x2="-30.48" y2="-3.81" width="0.3048" layer="21"/>
<wire x1="-30.48" y1="-3.81" x2="-29.21" y2="-3.81" width="0.3048" layer="21"/>
<wire x1="-29.21" y1="-3.81" x2="-28.575" y2="-3.81" width="0.3048" layer="21"/>
<wire x1="-28.575" y1="-3.81" x2="-27.305" y2="-3.81" width="0.3048" layer="21"/>
<wire x1="-27.305" y1="-3.81" x2="-25.4" y2="-3.81" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="-3.81" x2="-25.4" y2="-3.175" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="-3.175" x2="-25.4" y2="-2.2225" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="-2.2225" x2="-25.4" y2="-1.905" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="-1.905" x2="-25.4" y2="-1.27" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="-1.27" x2="-25.4" y2="-0.635" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="-0.635" x2="-25.4" y2="0" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="0" x2="-25.4" y2="0.635" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="0.635" x2="-25.4" y2="1.27" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="1.27" x2="-25.4" y2="1.905" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="1.905" x2="-25.4" y2="2.2225" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="2.2225" x2="-25.4" y2="3.175" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="3.175" x2="-25.4" y2="3.81" width="0.3048" layer="21"/>
<wire x1="-29.21" y1="8.89" x2="-29.21" y2="3.81" width="0.3048" layer="21"/>
<wire x1="-29.21" y1="-8.89" x2="-29.21" y2="-3.81" width="0.3048" layer="21"/>
<wire x1="19.05" y1="5.08" x2="19.05" y2="6.096" width="0.127" layer="21"/>
<wire x1="19.05" y1="6.096" x2="19.304" y2="6.35" width="0.127" layer="21" curve="-90"/>
<wire x1="19.304" y1="6.35" x2="21.59" y2="6.35" width="0.127" layer="21"/>
<wire x1="21.59" y1="6.35" x2="23.495" y2="6.35" width="0.3048" layer="21"/>
<wire x1="23.495" y1="6.35" x2="25.4" y2="6.35" width="0.127" layer="21"/>
<wire x1="25.4" y1="6.35" x2="27.6225" y2="6.35" width="0.3048" layer="21"/>
<wire x1="27.6225" y1="6.35" x2="30.861" y2="6.35" width="0.3048" layer="21"/>
<wire x1="30.861" y1="6.35" x2="31.115" y2="6.096" width="0.3048" layer="21" curve="-90"/>
<wire x1="31.115" y1="6.096" x2="31.115" y2="5.3975" width="0.3048" layer="21"/>
<wire x1="31.115" y1="5.3975" x2="30.7975" y2="5.08" width="0.3048" layer="21" curve="-90"/>
<wire x1="30.7975" y1="5.08" x2="29.845" y2="5.08" width="0.3048" layer="21"/>
<wire x1="29.845" y1="5.08" x2="29.21" y2="4.445" width="0.3048" layer="21" curve="90"/>
<wire x1="29.21" y1="4.445" x2="29.21" y2="3.175" width="0.3048" layer="21"/>
<wire x1="29.21" y1="3.175" x2="29.21" y2="2.54" width="0.3048" layer="21"/>
<wire x1="29.21" y1="2.54" x2="29.21" y2="1.905" width="0.3048" layer="21"/>
<wire x1="29.21" y1="1.905" x2="29.21" y2="1.27" width="0.3048" layer="21"/>
<wire x1="29.21" y1="1.27" x2="29.21" y2="0.635" width="0.3048" layer="21"/>
<wire x1="29.21" y1="0.635" x2="29.21" y2="0" width="0.3048" layer="21"/>
<wire x1="29.21" y1="0" x2="29.21" y2="-0.635" width="0.3048" layer="21"/>
<wire x1="29.21" y1="-0.635" x2="29.21" y2="-1.27" width="0.3048" layer="21"/>
<wire x1="29.21" y1="-1.27" x2="29.21" y2="-1.905" width="0.3048" layer="21"/>
<wire x1="29.21" y1="-1.905" x2="29.21" y2="-2.54" width="0.3048" layer="21"/>
<wire x1="29.21" y1="-2.54" x2="29.21" y2="-3.175" width="0.3048" layer="21"/>
<wire x1="29.21" y1="-3.175" x2="29.21" y2="-3.81" width="0.3048" layer="21"/>
<wire x1="29.21" y1="-3.81" x2="29.21" y2="-4.445" width="0.3048" layer="21"/>
<wire x1="29.21" y1="-4.445" x2="29.21" y2="-5.08" width="0.3048" layer="21"/>
<wire x1="29.21" y1="-5.08" x2="29.845" y2="-5.715" width="0.3048" layer="21" curve="90"/>
<wire x1="29.845" y1="-5.715" x2="30.7975" y2="-5.715" width="0.3048" layer="21"/>
<wire x1="30.7975" y1="-5.715" x2="31.115" y2="-6.0325" width="0.3048" layer="21" curve="-90"/>
<wire x1="31.115" y1="-6.0325" x2="31.115" y2="-6.096" width="0.3048" layer="21"/>
<wire x1="31.115" y1="-6.096" x2="30.861" y2="-6.35" width="0.3048" layer="21" curve="-90"/>
<wire x1="30.861" y1="-6.35" x2="19.304" y2="-6.35" width="0.3048" layer="21"/>
<wire x1="19.304" y1="-6.35" x2="19.05" y2="-6.096" width="0.3048" layer="21" curve="-90"/>
<wire x1="19.05" y1="-6.096" x2="19.05" y2="5.08" width="0.3048" layer="21"/>
<wire x1="29.21" y1="3.175" x2="30.861" y2="3.175" width="0.127" layer="21"/>
<wire x1="30.861" y1="3.175" x2="31.115" y2="2.921" width="0.127" layer="21" curve="-90"/>
<wire x1="31.115" y1="2.921" x2="31.115" y2="2.794" width="0.127" layer="21"/>
<wire x1="31.115" y1="2.794" x2="30.861" y2="2.54" width="0.127" layer="21" curve="-90"/>
<wire x1="30.861" y1="2.54" x2="29.21" y2="2.54" width="0.127" layer="21"/>
<wire x1="29.21" y1="1.905" x2="30.861" y2="1.905" width="0.127" layer="21"/>
<wire x1="30.861" y1="1.905" x2="31.115" y2="1.651" width="0.127" layer="21" curve="-90"/>
<wire x1="31.115" y1="1.651" x2="31.115" y2="1.524" width="0.127" layer="21"/>
<wire x1="31.115" y1="1.524" x2="30.861" y2="1.27" width="0.127" layer="21" curve="-90"/>
<wire x1="30.861" y1="1.27" x2="29.21" y2="1.27" width="0.127" layer="21"/>
<wire x1="29.21" y1="0.635" x2="30.861" y2="0.635" width="0.127" layer="21"/>
<wire x1="30.861" y1="0.635" x2="31.115" y2="0.381" width="0.127" layer="21" curve="-90"/>
<wire x1="31.115" y1="0.381" x2="31.115" y2="0.254" width="0.127" layer="21"/>
<wire x1="31.115" y1="0.254" x2="30.861" y2="0" width="0.127" layer="21" curve="-90"/>
<wire x1="30.861" y1="0" x2="29.21" y2="0" width="0.127" layer="21"/>
<wire x1="29.21" y1="-0.635" x2="30.861" y2="-0.635" width="0.127" layer="21"/>
<wire x1="30.861" y1="-0.635" x2="31.115" y2="-0.889" width="0.127" layer="21" curve="-90"/>
<wire x1="31.115" y1="-0.889" x2="31.115" y2="-1.016" width="0.127" layer="21"/>
<wire x1="31.115" y1="-1.016" x2="30.861" y2="-1.27" width="0.127" layer="21" curve="-90"/>
<wire x1="30.861" y1="-1.27" x2="29.21" y2="-1.27" width="0.127" layer="21"/>
<wire x1="29.21" y1="-1.905" x2="30.861" y2="-1.905" width="0.127" layer="21"/>
<wire x1="30.861" y1="-1.905" x2="31.115" y2="-2.159" width="0.127" layer="21" curve="-90"/>
<wire x1="31.115" y1="-2.159" x2="31.115" y2="-2.286" width="0.127" layer="21"/>
<wire x1="31.115" y1="-2.286" x2="30.861" y2="-2.54" width="0.127" layer="21" curve="-90"/>
<wire x1="30.861" y1="-2.54" x2="29.21" y2="-2.54" width="0.127" layer="21"/>
<wire x1="29.21" y1="-3.175" x2="30.861" y2="-3.175" width="0.127" layer="21"/>
<wire x1="30.861" y1="-3.175" x2="31.115" y2="-3.429" width="0.127" layer="21" curve="-90"/>
<wire x1="31.115" y1="-3.429" x2="31.115" y2="-3.556" width="0.127" layer="21"/>
<wire x1="31.115" y1="-3.556" x2="30.861" y2="-3.81" width="0.127" layer="21" curve="-90"/>
<wire x1="30.861" y1="-3.81" x2="29.21" y2="-3.81" width="0.127" layer="21"/>
<wire x1="29.21" y1="-4.445" x2="30.861" y2="-4.445" width="0.127" layer="21"/>
<wire x1="30.861" y1="-4.445" x2="31.115" y2="-4.699" width="0.127" layer="21" curve="-90"/>
<wire x1="31.115" y1="-4.699" x2="31.115" y2="-4.826" width="0.127" layer="21"/>
<wire x1="31.115" y1="-4.826" x2="30.861" y2="-5.08" width="0.127" layer="21" curve="-90"/>
<wire x1="30.861" y1="-5.08" x2="29.21" y2="-5.08" width="0.127" layer="21"/>
<wire x1="12.954" y1="-2.54" x2="16.256" y2="-2.54" width="0.127" layer="21"/>
<wire x1="16.256" y1="-2.54" x2="16.51" y2="-2.286" width="0.127" layer="21" curve="90"/>
<wire x1="16.51" y1="-2.286" x2="16.51" y2="2.286" width="0.127" layer="21"/>
<wire x1="16.51" y1="2.286" x2="16.256" y2="2.54" width="0.127" layer="21" curve="90"/>
<wire x1="16.256" y1="2.54" x2="12.954" y2="2.54" width="0.127" layer="21"/>
<wire x1="12.954" y1="2.54" x2="12.7" y2="2.286" width="0.127" layer="21" curve="90"/>
<wire x1="12.7" y1="2.286" x2="12.7" y2="-2.286" width="0.127" layer="21"/>
<wire x1="12.7" y1="-2.286" x2="12.954" y2="-2.54" width="0.127" layer="21" curve="90"/>
<wire x1="14.605" y1="-1.905" x2="13.335" y2="-0.635" width="0.3048" layer="21" curve="-90"/>
<wire x1="13.335" y1="-0.635" x2="13.335" y2="0.635" width="0.3048" layer="21"/>
<wire x1="13.335" y1="0.635" x2="14.605" y2="1.905" width="0.3048" layer="21" curve="-90"/>
<wire x1="14.605" y1="1.905" x2="15.875" y2="0.635" width="0.3048" layer="21" curve="-90"/>
<wire x1="15.875" y1="0.635" x2="15.875" y2="-0.635" width="0.3048" layer="21"/>
<wire x1="15.875" y1="-0.635" x2="14.605" y2="-1.905" width="0.3048" layer="21" curve="-90"/>
<wire x1="-22.86" y1="-3.175" x2="-20.32" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-20.32" y1="-3.175" x2="-10.16" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-10.16" y1="-3.175" x2="-10.16" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-10.16" y1="-5.715" x2="-20.32" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-20.32" y1="-5.715" x2="-22.86" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-22.86" y1="-5.715" x2="-22.86" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-20.32" y1="-3.175" x2="-20.32" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-25.4" y1="0" x2="-24.13" y2="0" width="0.127" layer="21"/>
<wire x1="-25.4" y1="0.635" x2="-24.13" y2="0.635" width="0.127" layer="21"/>
<wire x1="-25.4" y1="1.27" x2="-24.13" y2="1.27" width="0.127" layer="21"/>
<wire x1="-25.4" y1="-0.635" x2="-24.13" y2="-0.635" width="0.127" layer="21"/>
<wire x1="-25.4" y1="-1.27" x2="-24.13" y2="-1.27" width="0.127" layer="21"/>
<text x="2.69875" y="0" size="1.778" layer="21" ratio="12" distance="25" align="center">TEENSY
3.6</text>
<wire x1="19.05" y1="5.08" x2="21.336" y2="5.08" width="0.3048" layer="21"/>
<wire x1="21.336" y1="5.08" x2="21.59" y2="5.334" width="0.3048" layer="21" curve="90"/>
<wire x1="21.59" y1="5.334" x2="21.59" y2="6.35" width="0.3048" layer="21"/>
<wire x1="23.495" y1="6.35" x2="23.495" y2="5.334" width="0.3048" layer="21"/>
<wire x1="23.495" y1="5.334" x2="23.749" y2="5.08" width="0.3048" layer="21" curve="90"/>
<wire x1="23.749" y1="5.08" x2="25.146" y2="5.08" width="0.3048" layer="21"/>
<wire x1="25.146" y1="5.08" x2="25.4" y2="5.334" width="0.3048" layer="21" curve="90"/>
<wire x1="25.4" y1="5.334" x2="25.4" y2="6.35" width="0.3048" layer="21"/>
<wire x1="-25.4" y1="1.905" x2="-24.13" y2="1.905" width="0.127" layer="21"/>
<wire x1="-24.13" y1="1.905" x2="-24.13" y2="3.175" width="0.127" layer="21"/>
<wire x1="-24.13" y1="3.175" x2="-25.4" y2="3.175" width="0.127" layer="21"/>
<wire x1="-25.4" y1="-1.905" x2="-24.13" y2="-1.905" width="0.127" layer="21"/>
<wire x1="-24.13" y1="-1.905" x2="-24.13" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-24.13" y1="-3.175" x2="-25.4" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-28.575" y1="3.81" x2="-28.575" y2="5.08" width="0.127" layer="21"/>
<wire x1="-28.575" y1="5.08" x2="-27.305" y2="5.08" width="0.127" layer="21"/>
<wire x1="-27.305" y1="5.08" x2="-27.305" y2="3.81" width="0.127" layer="21"/>
<wire x1="-28.575" y1="-3.81" x2="-28.575" y2="-5.08" width="0.127" layer="21"/>
<wire x1="-28.575" y1="-5.08" x2="-27.305" y2="-5.08" width="0.127" layer="21"/>
<wire x1="-27.305" y1="-5.08" x2="-27.305" y2="-3.81" width="0.127" layer="21"/>
<wire x1="-29.845" y1="3.175" x2="-28.2575" y2="3.175" width="0.127" layer="21"/>
<wire x1="-28.2575" y1="3.175" x2="-27.94" y2="2.8575" width="0.127" layer="21" curve="-90"/>
<wire x1="-27.94" y1="2.8575" x2="-27.94" y2="2.2225" width="0.127" layer="21"/>
<wire x1="-27.94" y1="2.2225" x2="-28.2575" y2="1.905" width="0.127" layer="21" curve="-90"/>
<wire x1="-28.2575" y1="1.905" x2="-29.845" y2="1.905" width="0.127" layer="21"/>
<wire x1="-29.845" y1="-3.175" x2="-28.2575" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-28.2575" y1="-3.175" x2="-27.94" y2="-2.8575" width="0.127" layer="21" curve="90"/>
<wire x1="-27.94" y1="-2.8575" x2="-27.94" y2="-2.2225" width="0.127" layer="21"/>
<wire x1="-27.94" y1="-2.2225" x2="-28.2575" y2="-1.905" width="0.127" layer="21" curve="90"/>
<wire x1="-28.2575" y1="-1.905" x2="-29.845" y2="-1.905" width="0.127" layer="21"/>
<wire x1="-29.845" y1="3.175" x2="-29.845" y2="1.905" width="0.127" layer="21"/>
<wire x1="-29.845" y1="-1.905" x2="-29.845" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-5.715" y1="-5.715" x2="-5.334" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-5.334" y1="-5.715" x2="-5.08" y2="-5.461" width="0.127" layer="21" curve="90"/>
<wire x1="-5.08" y1="-5.461" x2="-5.08" y2="-5.08" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-5.08" x2="-5.08" y2="-4.445" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-4.445" x2="-5.08" y2="-3.81" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-3.81" x2="-5.08" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-3.175" x2="-5.08" y2="-2.794" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-2.794" x2="-5.334" y2="-2.54" width="0.127" layer="21" curve="90"/>
<wire x1="-5.334" y1="-2.54" x2="-5.715" y2="-2.54" width="0.127" layer="21"/>
<wire x1="-5.715" y1="-2.54" x2="-6.35" y2="-2.54" width="0.127" layer="21"/>
<wire x1="-6.35" y1="-2.54" x2="-6.985" y2="-2.54" width="0.127" layer="21"/>
<wire x1="-6.985" y1="-2.54" x2="-7.62" y2="-2.54" width="0.127" layer="21"/>
<wire x1="-7.62" y1="-2.54" x2="-8.001" y2="-2.54" width="0.127" layer="21"/>
<wire x1="-8.001" y1="-2.54" x2="-8.255" y2="-2.794" width="0.127" layer="21" curve="90"/>
<wire x1="-8.255" y1="-2.794" x2="-8.255" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-3.175" x2="-8.255" y2="-3.81" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-3.81" x2="-8.255" y2="-4.445" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-4.445" x2="-8.255" y2="-5.08" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-5.08" x2="-8.255" y2="-5.461" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-5.461" x2="-8.001" y2="-5.715" width="0.127" layer="21" curve="90"/>
<wire x1="-8.001" y1="-5.715" x2="-7.62" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-7.62" y1="-5.715" x2="-6.985" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-6.985" y1="-5.715" x2="-6.35" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-6.35" y1="-5.715" x2="-5.715" y2="-5.715" width="0.127" layer="21"/>
<wire x1="-13.335" y1="1.016" x2="-13.335" y2="-1.016" width="0.127" layer="21"/>
<wire x1="-13.335" y1="-1.016" x2="-13.081" y2="-1.27" width="0.127" layer="21" curve="90"/>
<wire x1="-13.081" y1="-1.27" x2="-11.049" y2="-1.27" width="0.127" layer="21"/>
<wire x1="-11.049" y1="-1.27" x2="-10.795" y2="-1.016" width="0.127" layer="21" curve="90"/>
<wire x1="-10.795" y1="-1.016" x2="-10.795" y2="1.016" width="0.127" layer="21"/>
<wire x1="-10.795" y1="1.016" x2="-11.049" y2="1.27" width="0.127" layer="21" curve="90"/>
<wire x1="-11.049" y1="1.27" x2="-13.081" y2="1.27" width="0.127" layer="21"/>
<wire x1="-13.081" y1="1.27" x2="-13.335" y2="1.016" width="0.127" layer="21" curve="90"/>
<wire x1="20.0025" y1="-2.159" x2="20.0025" y2="-2.6035" width="0.127" layer="21"/>
<wire x1="20.0025" y1="-2.6035" x2="20.2565" y2="-2.8575" width="0.127" layer="21" curve="90"/>
<wire x1="20.2565" y1="-2.8575" x2="21.336" y2="-2.8575" width="0.127" layer="21"/>
<wire x1="21.336" y1="-2.8575" x2="21.59" y2="-2.6035" width="0.127" layer="21" curve="90"/>
<wire x1="21.59" y1="-2.6035" x2="21.59" y2="-2.159" width="0.127" layer="21"/>
<wire x1="21.59" y1="-2.159" x2="21.336" y2="-1.905" width="0.127" layer="21" curve="90"/>
<wire x1="21.336" y1="-1.905" x2="20.2565" y2="-1.905" width="0.127" layer="21"/>
<wire x1="20.2565" y1="-1.905" x2="20.0025" y2="-2.159" width="0.127" layer="21" curve="90"/>
<wire x1="20.0025" y1="-3.81" x2="20.0025" y2="-5.3975" width="0.127" layer="21"/>
<wire x1="20.0025" y1="-5.3975" x2="21.59" y2="-5.3975" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-3.81" x2="-4.7625" y2="-3.81" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-4.445" x2="-4.7625" y2="-4.445" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-5.08" x2="-4.7625" y2="-5.08" width="0.127" layer="21"/>
<wire x1="-5.08" y1="-3.175" x2="-4.7625" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-5.715" y1="-2.54" x2="-5.715" y2="-2.2225" width="0.127" layer="21"/>
<wire x1="-6.35" y1="-2.54" x2="-6.35" y2="-2.2225" width="0.127" layer="21"/>
<wire x1="-6.985" y1="-2.54" x2="-6.985" y2="-2.2225" width="0.127" layer="21"/>
<wire x1="-7.62" y1="-2.54" x2="-7.62" y2="-2.2225" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-3.175" x2="-8.5725" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-3.81" x2="-8.5725" y2="-3.81" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-4.445" x2="-8.5725" y2="-4.445" width="0.127" layer="21"/>
<wire x1="-8.255" y1="-5.08" x2="-8.5725" y2="-5.08" width="0.127" layer="21"/>
<wire x1="-5.715" y1="-5.715" x2="-5.715" y2="-6.0325" width="0.127" layer="21"/>
<wire x1="-6.35" y1="-5.715" x2="-6.35" y2="-6.0325" width="0.127" layer="21"/>
<wire x1="-6.985" y1="-5.715" x2="-6.985" y2="-6.0325" width="0.127" layer="21"/>
<wire x1="-7.62" y1="-5.715" x2="-7.62" y2="-6.0325" width="0.127" layer="21"/>
<wire x1="27.6225" y1="6.35" x2="27.6225" y2="5.3975" width="0.127" layer="21"/>
<wire x1="27.6225" y1="5.3975" x2="27.94" y2="5.08" width="0.127" layer="21" curve="90"/>
<wire x1="27.94" y1="5.08" x2="28.8925" y2="5.08" width="0.127" layer="21"/>
<wire x1="28.8925" y1="5.08" x2="28.8925" y2="5.3975" width="0.127" layer="21"/>
<wire x1="28.8925" y1="5.3975" x2="29.21" y2="5.715" width="0.127" layer="21" curve="-90"/>
<wire x1="29.21" y1="5.715" x2="29.5275" y2="5.715" width="0.127" layer="21"/>
<wire x1="-25.4" y1="1.27" x2="-26.67" y2="1.27" width="0.127" layer="21"/>
<wire x1="-26.67" y1="1.27" x2="-26.67" y2="3.175" width="0.127" layer="21"/>
<wire x1="-26.67" y1="3.175" x2="-26.204921875" y2="3.175" width="0.127" layer="21"/>
<wire x1="-26.204921875" y1="3.175" x2="-25.94074375" y2="3.033615625" width="0.127" layer="21" curve="-56.310402"/>
<wire x1="-25.94074375" y1="3.033615625" x2="-25.4" y2="2.2225" width="0.127" layer="21"/>
<wire x1="-25.4" y1="-1.27" x2="-26.67" y2="-1.27" width="0.127" layer="21"/>
<wire x1="-26.67" y1="-1.27" x2="-26.67" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-26.67" y1="-3.175" x2="-26.204921875" y2="-3.175" width="0.127" layer="21"/>
<wire x1="-26.204921875" y1="-3.175" x2="-25.94074375" y2="-3.033615625" width="0.127" layer="21" curve="56.310402"/>
<wire x1="-25.94074375" y1="-3.033615625" x2="-25.4" y2="-2.2225" width="0.127" layer="21"/>
<circle x="-21.59" y="-4.445" radius="0.635" width="0.3048" layer="21"/>
<circle x="-19.05" y="-4.445" radius="0.635" width="0.3048" layer="21"/>
<circle x="-16.51" y="-4.445" radius="0.635" width="0.3048" layer="21"/>
<circle x="-13.97" y="-4.445" radius="0.635" width="0.3048" layer="21"/>
<circle x="-11.43" y="-4.445" radius="0.635" width="0.3048" layer="21"/>
<circle x="17.78" y="-5.08" radius="0.635" width="0.3048" layer="21"/>
<circle x="17.78" y="-2.54" radius="0.635" width="0.3048" layer="21"/>
<circle x="17.78" y="0" radius="0.635" width="0.3048" layer="21"/>
<circle x="17.78" y="2.54" radius="0.635" width="0.3048" layer="21"/>
<circle x="17.78" y="5.08" radius="0.635" width="0.3048" layer="21"/>
</package>
</packages>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0.1524" drill="0">
</class>
<class number="1" name="signal" width="0.2032" drill="0">
</class>
<class number="2" name="current" width="0.635" drill="0">
</class>
</classes>
<designrules name="default *">
<description language="de"><b>EAGLE Design Rules</b>
<p>
Die Standard-Design-Rules sind so gewählt, dass sie für
die meisten Anwendungen passen. Sollte ihre Platine
besondere Anforderungen haben, treffen Sie die erforderlichen
Einstellungen hier und speichern die Design Rules unter
einem neuen Namen ab.</description>
<description language="en"><b>EAGLE Design Rules</b>
<p>
The default Design Rules have been set to cover
a wide range of applications. Your particular design
may have different requirements, so please make the
necessary adjustments and save your customized
design rules under a new name.</description>
<param name="layerSetup" value="(1*16)"/>
<param name="mtCopper" value="0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm"/>
<param name="mtIsolate" value="1.5mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm"/>
<param name="mdWireWire" value="8mil"/>
<param name="mdWirePad" value="8mil"/>
<param name="mdWireVia" value="8mil"/>
<param name="mdPadPad" value="8mil"/>
<param name="mdPadVia" value="8mil"/>
<param name="mdViaVia" value="8mil"/>
<param name="mdSmdPad" value="8mil"/>
<param name="mdSmdVia" value="8mil"/>
<param name="mdSmdSmd" value="8mil"/>
<param name="mdViaViaSameLayer" value="6mil"/>
<param name="mnLayersViaInSmd" value="2"/>
<param name="mdCopperDimension" value="40mil"/>
<param name="mdDrill" value="6mil"/>
<param name="mdSmdStop" value="0mil"/>
<param name="msWidth" value="12mil"/>
<param name="msDrill" value="0.35mm"/>
<param name="msMicroVia" value="9.99mm"/>
<param name="msBlindViaRatio" value="0.5"/>
<param name="rvPadTop" value="0.25"/>
<param name="rvPadInner" value="0.25"/>
<param name="rvPadBottom" value="0.25"/>
<param name="rvViaOuter" value="0.25"/>
<param name="rvViaInner" value="0.25"/>
<param name="rvMicroViaOuter" value="0.25"/>
<param name="rvMicroViaInner" value="0.25"/>
<param name="rlMinPadTop" value="10mil"/>
<param name="rlMaxPadTop" value="20mil"/>
<param name="rlMinPadInner" value="10mil"/>
<param name="rlMaxPadInner" value="20mil"/>
<param name="rlMinPadBottom" value="10mil"/>
<param name="rlMaxPadBottom" value="20mil"/>
<param name="rlMinViaOuter" value="8mil"/>
<param name="rlMaxViaOuter" value="20mil"/>
<param name="rlMinViaInner" value="8mil"/>
<param name="rlMaxViaInner" value="20mil"/>
<param name="rlMinMicroViaOuter" value="4mil"/>
<param name="rlMaxMicroViaOuter" value="20mil"/>
<param name="rlMinMicroViaInner" value="4mil"/>
<param name="rlMaxMicroViaInner" value="20mil"/>
<param name="psTop" value="-1"/>
<param name="psBottom" value="-1"/>
<param name="psFirst" value="-1"/>
<param name="psElongationLong" value="100"/>
<param name="psElongationOffset" value="100"/>
<param name="mvStopFrame" value="1"/>
<param name="mvCreamFrame" value="0"/>
<param name="mlMinStopFrame" value="4mil"/>
<param name="mlMaxStopFrame" value="4mil"/>
<param name="mlMinCreamFrame" value="0mil"/>
<param name="mlMaxCreamFrame" value="0mil"/>
<param name="mlViaStopLimit" value="0mil"/>
<param name="srRoundness" value="0"/>
<param name="srMinRoundness" value="0mil"/>
<param name="srMaxRoundness" value="0mil"/>
<param name="slThermalIsolate" value="10mil"/>
<param name="slThermalsForVias" value="0"/>
<param name="dpMaxLengthDifference" value="10mm"/>
<param name="dpGapFactor" value="2.5"/>
<param name="checkAngle" value="0"/>
<param name="checkFont" value="1"/>
<param name="checkRestrict" value="1"/>
<param name="checkStop" value="0"/>
<param name="checkValues" value="0"/>
<param name="checkNames" value="1"/>
<param name="checkWireStubs" value="1"/>
<param name="checkPolygonWidth" value="0"/>
<param name="useDiameter" value="13"/>
<param name="maxErrors" value="50"/>
</designrules>
<autorouter>
<pass name="Default">
<param name="RoutingGrid" value="50mil"/>
<param name="AutoGrid" value="1"/>
<param name="Efforts" value="2"/>
<param name="TopRouterVariant" value="1"/>
<param name="tpViaShape" value="round"/>
<param name="PrefDir.1" value="a"/>
<param name="PrefDir.2" value="0"/>
<param name="PrefDir.3" value="0"/>
<param name="PrefDir.4" value="0"/>
<param name="PrefDir.5" value="0"/>
<param name="PrefDir.6" value="0"/>
<param name="PrefDir.7" value="0"/>
<param name="PrefDir.8" value="0"/>
<param name="PrefDir.9" value="0"/>
<param name="PrefDir.10" value="0"/>
<param name="PrefDir.11" value="0"/>
<param name="PrefDir.12" value="0"/>
<param name="PrefDir.13" value="0"/>
<param name="PrefDir.14" value="0"/>
<param name="PrefDir.15" value="0"/>
<param name="PrefDir.16" value="a"/>
<param name="cfVia" value="8"/>
<param name="cfNonPref" value="5"/>
<param name="cfChangeDir" value="2"/>
<param name="cfOrthStep" value="2"/>
<param name="cfDiagStep" value="3"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="1"/>
<param name="cfMalusStep" value="1"/>
<param name="cfPadImpact" value="4"/>
<param name="cfSmdImpact" value="4"/>
<param name="cfBusImpact" value="0"/>
<param name="cfHugging" value="3"/>
<param name="cfAvoid" value="4"/>
<param name="cfPolygon" value="10"/>
<param name="cfBase.1" value="0"/>
<param name="cfBase.2" value="1"/>
<param name="cfBase.3" value="1"/>
<param name="cfBase.4" value="1"/>
<param name="cfBase.5" value="1"/>
<param name="cfBase.6" value="1"/>
<param name="cfBase.7" value="1"/>
<param name="cfBase.8" value="1"/>
<param name="cfBase.9" value="1"/>
<param name="cfBase.10" value="1"/>
<param name="cfBase.11" value="1"/>
<param name="cfBase.12" value="1"/>
<param name="cfBase.13" value="1"/>
<param name="cfBase.14" value="1"/>
<param name="cfBase.15" value="1"/>
<param name="cfBase.16" value="0"/>
<param name="mnVias" value="20"/>
<param name="mnSegments" value="9999"/>
<param name="mnExtdSteps" value="9999"/>
<param name="mnRipupLevel" value="10"/>
<param name="mnRipupSteps" value="100"/>
<param name="mnRipupTotal" value="100"/>
</pass>
<pass name="Follow-me" refer="Default" active="yes">
</pass>
<pass name="Busses" refer="Default" active="yes">
<param name="cfNonPref" value="4"/>
<param name="cfBusImpact" value="4"/>
<param name="cfHugging" value="0"/>
<param name="mnVias" value="0"/>
</pass>
<pass name="Route" refer="Default" active="yes">
</pass>
<pass name="Optimize1" refer="Default" active="yes">
<param name="cfVia" value="99"/>
<param name="cfExtdStep" value="10"/>
<param name="cfHugging" value="1"/>
<param name="mnExtdSteps" value="1"/>
<param name="mnRipupLevel" value="0"/>
</pass>
<pass name="Optimize2" refer="Optimize1" active="yes">
<param name="cfNonPref" value="0"/>
<param name="cfChangeDir" value="6"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="2"/>
<param name="cfMalusStep" value="2"/>
<param name="cfPadImpact" value="2"/>
<param name="cfSmdImpact" value="2"/>
<param name="cfHugging" value="0"/>
</pass>
<pass name="Optimize3" refer="Optimize2" active="yes">
<param name="cfChangeDir" value="8"/>
<param name="cfPadImpact" value="0"/>
<param name="cfSmdImpact" value="0"/>
</pass>
<pass name="Optimize4" refer="Optimize3" active="yes">
<param name="cfChangeDir" value="25"/>
</pass>
</autorouter>
<elements>
<element name="JP1" library="pinhead" library_urn="urn:adsk.eagle:library:325" package="1X08" package3d_urn="urn:adsk.eagle:package:22409/2" value="" x="17.78" y="73.66" smashed="yes">
<attribute name="POPULARITY" value="67" x="49.53" y="31.75" size="1.778" layer="27" display="off"/>
<attribute name="VALUE" x="7.62" y="70.485" size="1.27" layer="27"/>
</element>
<element name="SW2" library="282834-2" package="CONN_282834-2" override_package3d_urn="urn:adsk.eagle:package:28284809/2" override_package_urn="urn:adsk.eagle:footprint:28284810/1" value="" x="44.45" y="93.98" smashed="yes" rot="R180">
<attribute name="AVAILABILITY" value="Good" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="CENTERLINE_PITCH" value="2.54 mm[.1 in]" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="COMMENT" value="282834-2" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="DESCRIPTION" value=" Wire-To-Board Terminal Block, 2, 150 V, 10 A, 30 Awg, 16 Awg, 1.4 Mm " x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="EU_ROHS_COMPLIANCE" value="Compliant with Exemptions" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="MF" value="TE Connectivity" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="MP" value="282834-2" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="NUMBER_OF_POSITIONS" value="2" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="PACKAGE" value="None" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="PRICE" value="None" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
<attribute name="PURCHASE-URL" value="https://pricing.snapeda.com/search/part/282834-2/?ref=eda" x="27.94" y="138.43" size="1.778" layer="27" rot="R180" display="off"/>
</element>
<element name="U1" library="Teensy356" package="TEENSY_3.5/3.6_BASIC" override_package3d_urn="urn:adsk.eagle:package:28291835/2" override_package_urn="urn:adsk.eagle:footprint:28291836/1" value="TEENSY_3.5/3.6_BASIC" x="30.48" y="60.96" smashed="yes"/>
</elements>
<signals>
<signal name="VCC" class="2">
<contactref element="U1" pad="3V3"/>
<contactref element="JP1" pad="1"/>
<wire x1="37.465" y1="53.34" x2="38.1" y2="53.34" width="0.635" layer="16"/>
<wire x1="23.495" y1="67.31" x2="37.465" y2="53.34" width="0.635" layer="16"/>
<wire x1="14.605" y1="67.31" x2="23.495" y2="67.31" width="0.635" layer="16"/>
<wire x1="13.97" y1="67.945" x2="14.605" y2="67.31" width="0.635" layer="16"/>
<wire x1="13.97" y1="69.215" x2="13.97" y2="67.945" width="0.635" layer="16"/>
<wire x1="11.684" y1="71.501" x2="13.97" y2="69.215" width="0.635" layer="16"/>
<wire x1="10.922" y1="71.501" x2="11.684" y2="71.501" width="0.635" layer="16"/>
<wire x1="8.89" y1="73.533" x2="10.922" y2="71.501" width="0.635" layer="16"/>
<wire x1="8.89" y1="73.66" x2="8.89" y2="73.533" width="0.635" layer="16"/>
</signal>
<signal name="GND" class="2">
<contactref element="SW2" pad="1"/>
<contactref element="U1" pad="GND2"/>
<contactref element="JP1" pad="2"/>
<wire x1="38.1" y1="86.36" x2="38.1" y2="75.819" width="0.635" layer="1"/>
<wire x1="38.1" y1="75.819" x2="38.1" y2="68.58" width="0.635" layer="1"/>
<wire x1="45.72" y1="93.98" x2="38.1" y2="86.36" width="0.635" layer="1"/>
<wire x1="12.573" y1="74.803" x2="11.43" y2="73.66" width="0.635" layer="1"/>
<wire x1="12.573" y1="74.93" x2="12.573" y2="74.803" width="0.635" layer="1"/>
<wire x1="13.462" y1="75.819" x2="12.573" y2="74.93" width="0.635" layer="1"/>
<wire x1="38.1" y1="75.819" x2="13.462" y2="75.819" width="0.635" layer="1"/>
</signal>
<signal name="SCL" class="1">
<contactref element="U1" pad="19/A5/SCL"/>
<contactref element="JP1" pad="3"/>
<wire x1="19.431" y1="68.58" x2="20.32" y2="68.58" width="0.3048" layer="16"/>
<wire x1="16.256" y1="71.755" x2="19.431" y2="68.58" width="0.3048" layer="16"/>
<wire x1="15.875" y1="71.755" x2="16.256" y2="71.755" width="0.3048" layer="16"/>
<wire x1="13.97" y1="73.66" x2="15.875" y2="71.755" width="0.3048" layer="16"/>
</signal>
<signal name="SDA" class="1">
<contactref element="U1" pad="18/A4/SDA"/>
<contactref element="JP1" pad="4"/>
<wire x1="21.971" y1="68.58" x2="22.86" y2="68.58" width="0.3048" layer="16"/>
<wire x1="18.796" y1="71.755" x2="21.971" y2="68.58" width="0.3048" layer="16"/>
<wire x1="18.415" y1="71.755" x2="18.796" y2="71.755" width="0.3048" layer="16"/>
<wire x1="16.51" y1="73.66" x2="18.415" y2="71.755" width="0.3048" layer="16"/>
</signal>
<signal name="VBUS" class="2">
<contactref element="SW2" pad="2"/>
<contactref element="JP1" pad="6"/>
<wire x1="22.733" y1="74.803" x2="21.59" y2="73.66" width="0.635" layer="16"/>
<wire x1="22.733" y1="74.93" x2="22.733" y2="74.803" width="0.635" layer="16"/>
<wire x1="41.783" y1="93.98" x2="22.733" y2="74.93" width="0.635" layer="16"/>
<wire x1="43.18" y1="93.98" x2="41.783" y2="93.98" width="0.635" layer="16"/>
</signal>
<signal name="ALERT" class="1">
<contactref element="JP1" pad="5"/>
<contactref element="U1" pad="21/A7"/>
<wire x1="15.24" y1="69.85" x2="15.24" y2="68.58" width="0.3048" layer="1"/>
<wire x1="19.05" y1="73.66" x2="15.24" y2="69.85" width="0.3048" layer="1"/>
</signal>
</signals>
<mfgpreviewcolors>
<mfgpreviewcolor name="soldermaskcolor" color="0xC8008000"/>
<mfgpreviewcolor name="silkscreencolor" color="0xFFFEFEFE"/>
<mfgpreviewcolor name="backgroundcolor" color="0xFF282828"/>
<mfgpreviewcolor name="coppercolor" color="0xFFFFBF00"/>
<mfgpreviewcolor name="substratecolor" color="0xFF786E46"/>
</mfgpreviewcolors>
</board>
</drawing>
<compatibility>
<note version="6.3" minversion="6.2.2" severity="warning">
Since Version 6.2.2 text objects can contain more than one line,
which will not be processed correctly with this version.
</note>
<note version="8.2" severity="warning">
Since Version 8.2, EAGLE supports online libraries. The ids
of those online libraries will not be understood (or retained)
with this version.
</note>
<note version="8.3" severity="warning">
Since Version 8.3, EAGLE supports Fusion synchronisation.
This feature will not be available in this version and saving
the document will break the link to the Fusion PCB feature.
</note>
<note version="8.3" severity="warning">
Since Version 8.3, EAGLE supports URNs for individual library
assets (packages, symbols, and devices). The URNs of those assets
will not be understood (or retained) with this version.
</note>
<note version="8.3" severity="warning">
Since Version 8.3, EAGLE supports the association of 3D packages
with devices in libraries, schematics, and board files. Those 3D
packages will not be understood (or retained) with this version.
</note>
<note version="9.4" severity="warning">
Since Version 9.4, EAGLE supports the overriding of 3D packages
in schematics and board files. Those overridden 3d packages
will not be understood (or retained) with this version.
</note>
</compatibility>
</eagle>


text:
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package packetbuffer

import (
	"fmt"

	"gvisor.dev/gvisor/pkg/tcpip/buffer"
	"gvisor.dev/gvisor/pkg/tcpip/stack"
)

// OutboundToInbound coverts a PacketBuffer that conforms to the
// contract of WritePacket to one that conforms to the contract of
// DeliverNetworkPacket/InjectInbound/etc.
//
// The contract of WritePacket differs from that of DeliverNetworkPacket.
// WritePacket treats Header and Data as disjoint buffers; DeliverNetworkPacket
// expects Data to contain the full packet, including any Header bytes if they
// are present.
func OutboundToInbound(pkt *stack.PacketBuffer) *stack.PacketBuffer {
	views := make([]buffer.View, 1, 1+len(pkt.Data.Views()))
	views[0] = pkt.Header.View()
	views = append(views, pkt.Data.Views()...)

	return &stack.PacketBuffer{
		Data: buffer.NewVectorisedView(len(views[0])+pkt.Data.Size(), views),
	}
}

// EnsurePopulatedHeader smashes pkt.Data into pkt.Header, leaving
// maxLinkHeaderLen space in reserve.
func EnsurePopulatedHeader(pkt *stack.PacketBuffer, maxLinkHeaderLen uint16) {
	if pkt.Data.Size() == 0 {
		return
	}
	hdr := pkt.Header
	pkt.Header = buffer.NewPrependable(hdr.UsedLength() + pkt.Data.Size() + int(maxLinkHeaderLen))
	for i := len(pkt.Data.Views()); i != 0; i-- {
		view := pkt.Data.Views()[i-1]
		if n := copy(pkt.Header.Prepend(len(view)), view); n != len(view) {
			panic(fmt.Sprintf("copied %d bytes, expected %d bytes", n, len(view)))
		}
	}
	if n := copy(pkt.Header.Prepend(hdr.UsedLength()), hdr.View()); n != hdr.UsedLength() {
		panic(fmt.Sprintf("copied %d bytes, expected %d bytes", n, hdr.UsedLength()))
	}
	pkt.Data = buffer.VectorisedView{}
}

repository: oshunter/fuchsia

license_type: permissive

repo_name: oshunter/fuchsia

branch_name: refs/heads/master

extension: go


text:
require imglib-c66x.inc

PV = "3_1_1_0"
PR = "r1"

LIC_FILES_CHKSUM = "file://packages/ti/imglib/src/common/IMG_profile.h;beginline=1;endline=35;md5=a21fc16da34b650ce33a9a7143908667"

SRC_URI[imglib.md5sum] = "9d64f213e040899048446df5055deeca"
SRC_URI[imglib.sha256sum] = "f3153e51530f26cfc638efca7ca6ae1bbaf7736daf287fc972592372a676ed21"

license: MIT

repository: YoeDistro/meta-ti

repo_name: YoeDistro/meta-ti

gha_license_id: MIT

gha_language: BitBake

extension: bb


text:
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using PlaylistCore.Utilities;
namespace PlaylistCore.Data
{
    public static class PlaylistsCollection
    {
        public static List<Playlist> loadedPlaylists = new List<Playlist>();

        public static SongCore.OverrideClasses.SongCoreCustomBeatmapLevelPack CreateLevelPackFromPlaylist(Playlist playlist)
        {
            return new SongCore.OverrideClasses.SongCoreCustomBeatmapLevelPack($"{CustomLevelLoaderSO.kCustomLevelPackPrefixId}Playlist_{playlist.playlistTitle}_{playlist.playlistAuthor}", "Playlist - " + playlist.playlistTitle, playlist.icon, new SongCore.OverrideClasses.SongCoreCustomLevelCollection(playlist.songs.Where(x => x.level != null).Select(x => x.level).ToArray()));
        }
        public static void ReloadPlaylists(bool fullRefresh = true)
        {
            try
            {
                List<string> playlistFiles = new List<string>();
                string[] localJSONPlaylists = Directory.GetFiles(Path.Combine(Environment.CurrentDirectory, "Playlists"), "*.json");
                string[] localBPLISTPlaylists = Directory.GetFiles(Path.Combine(Environment.CurrentDirectory, "Playlists"), "*.bplist");
                playlistFiles.AddRange(localJSONPlaylists);
                playlistFiles.AddRange(localBPLISTPlaylists);

                Logging.Log.Info($"Found {localJSONPlaylists.Length + localBPLISTPlaylists.Length} playlists in Playlists folder");

                if (fullRefresh)
                {
                    loadedPlaylists.Clear();

                    foreach (string path in playlistFiles)
                    {
                        try
                        {
                            Playlist playlist = Playlist.LoadPlaylist(path);
                            loadedPlaylists.Add(playlist);
                        }
                        catch (Exception e)
                        {
                            Logging.Log.Warn($"Unable to parse playlist @ {path}! Exception: {e}");
                        }
                    }
                }
                else
                {
                    foreach (string path in playlistFiles)
                    {
                        if (!loadedPlaylists.Any(x => x.fileLoc == path))
                        {
                            try
                            {
                                Playlist playlist = Playlist.LoadPlaylist(path);
                                if (Path.GetFileName(path) == "favorites.json" && playlist.playlistTitle == "Your favorite songs")
                                    continue;
                                loadedPlaylists.Add(playlist);
                                //bananbread songloader loaded playlist id
                                if (SongCore.Loader.AreSongsLoaded)
                                {
                                    MatchSongsForPlaylist(playlist);
                                }
                            }
                            catch (Exception e)
                            {
                                Logging.Log.Info($"Unable to parse playlist @ {path}! Exception: {e}");
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Logging.Log.Critical("Unable to load playlists! Exception: " + e);
            }

        }

        public static void MatchSongsForPlaylist(Playlist playlist, bool matchAll = false)
        {
            if (!SongCore.Loader.AreSongsLoaded || SongCore.Loader.AreSongsLoading)
            {
                Logging.Log.Info("Songs not loaded. Not Matching songs for playlist.");
                return;
            }
            if (!playlist.songs.All(x => x.level != null) || matchAll)
            {
                playlist.songs.AsParallel().ForAll(x =>
                {
                    if (x.level == null || matchAll)
                    {
                        try
                        {
                      //      Logging.Log.Info("Trying to match " + x.hash + " with " + SongCore.Loader.CustomLevels.Values.Count + " songs");
                            if (x.level == null && !string.IsNullOrEmpty(x.hash))
                            {
                                x.level = SongCore.Loader.CustomLevels.Values.FirstOrDefault(y => string.Equals(y.levelID.Split('_')[2], x.hash, StringComparison.OrdinalIgnoreCase));
                            }

                        }
                        catch (Exception e)
                        {
                            Logging.Log.Warn($"Unable to match song with {(string.IsNullOrEmpty(x.hash) ? " unknown hash!" : ("hash " + x.hash + " !"))}");
                        }
                    }
                });
            }

        }

        public static void MatchSongsForAllPlaylists(bool matchAll = false)
        {
            Logging.Log.Info("Matching songs for all playlists!");
            Task.Run(() =>
            {
                for (int i = 0; i < loadedPlaylists.Count; i++)
                {
                    MatchSongsForPlaylist(loadedPlaylists[i], matchAll);
                }
                //Update LevelPacks
                PlaylistLevelPackManagement.SetPlaylistPacks();
                //                Plugin.DebugLogPlaylists();
            });
        }

        public static void RemoveLevelFromPlaylist(Playlist playlist, string hash)
        {
            if (playlist.songs.Any(x => x.hash == hash))
            {
                PlaylistSong song = playlist.songs.First(x => x.hash == hash);
                song.level = null;
                playlist.songs.Remove(song);
            }
                playlist.SavePlaylist();
            //Update Playlist Pack

        }
        public static void AddLevelToPlaylist(Playlist playlist, CustomPreviewBeatmapLevel level)
        {
            string hash = SongCore.Utilities.Hashing.GetCustomLevelHash(level);
            if (playlist.songs.Any(x => string.Equals(x.hash, hash, StringComparison.OrdinalIgnoreCase))) return;
            PlaylistSong song = new PlaylistSong();
            song.hash = hash;
            song.level = level;
            song.levelId = level.levelID;
            song.songName = level.songName + " - " + level.levelAuthorName;
            playlist.songs.Add(song);
            playlist.SavePlaylist();
        }

    }
    public class Playlist
    {
        public string playlistTitle { get; set; } = "";
        public string playlistAuthor { get; set; } = "";
        public string image { get; set; }
        public int playlistSongCount { get; set; }
        public List<PlaylistSong> songs { get; set; }
        public string fileLoc { get; set; }
        public string customDetailUrl { get; set; } = "";
        public string customArchiveUrl { get; set; } = "";

        [NonSerialized]
        public Sprite icon;
        public Playlist()
        {

        }

        public Playlist(JObject playlistNode)
        {

            if (playlistNode.ContainsKey("image"))
                image = (string)playlistNode["image"];

            if (!string.IsNullOrWhiteSpace(image))
            {
                try
                {
                    icon = Sprites.Base64ToSprite(image.Substring(image.IndexOf(",") + 1));
                }
                catch
                {
                    Logging.Log.Critical("Unable to convert playlist image to sprite!");
                    icon = Sprites.PlaylistIcon;
                }
            }
            else
            {
                icon = Sprites.PlaylistIcon;
            }
            if (playlistNode.ContainsKey("playlistTitle"))
                playlistTitle = (string)playlistNode["playlistTitle"];
            if (playlistNode.ContainsKey("playlistAuthor"))
                playlistAuthor = (string)playlistNode["playlistAuthor"];
            if (playlistNode.ContainsKey("imcustomDetailUrlage"))
                customDetailUrl = (string)playlistNode["customDetailUrl"];
            if (playlistNode.ContainsKey("customArchiveUrl"))
                customArchiveUrl = (string)playlistNode["customArchiveUrl"];

            this.songs = new List<PlaylistSong>();

            JArray songs = (JArray)playlistNode["songs"];
            foreach (JObject song in songs)
            {
                PlaylistSong newSong = new PlaylistSong();
                if (song.ContainsKey("key"))
                    newSong.key = (string)song["key"];
                if (song.ContainsKey("songName"))
                    newSong.songName = (string)song["songName"];
                if (song.ContainsKey("hash"))
                    newSong.hash = (string)song["hash"];
                if (song.ContainsKey("levelId"))
                    newSong.levelId = (string)song["levelId"];

                this.songs.Add(newSong);
            }

            playlistSongCount = this.songs.Count;

            if (playlistNode.ContainsKey("fileLoc"))
                fileLoc = (string)playlistNode["fileLoc"];

            if (playlistNode.ContainsKey("playlistURL"))
                fileLoc = (string)playlistNode["playlistURL"];
        }

        public static Playlist LoadPlaylist(string path)
        {
            Playlist playlist = new Playlist(JObject.Parse(File.ReadAllText(path)));
            playlist.fileLoc = path;
            return playlist;
        }

        public void SavePlaylist(string path = "")
        {
            SharedCoroutineStarter.instance.StartCoroutine(SavePlaylistCoroutine(path));
        }

        public IEnumerator SavePlaylistCoroutine(string path = "")
        {
            Logging.Log.Info($"Saving playlist \"{playlistTitle}\"...");
            try
            {
                image = Sprites.SpriteToBase64(icon);
                playlistSongCount = songs.Count;
            }
            catch (Exception e)
            {
                Logging.Log.Critical("Unable to save playlist! Exception: " + e);
                yield break;
            }
            try
            {
                if (!string.IsNullOrEmpty(path))
                {
                    fileLoc = Path.GetFullPath(path);
                }

                File.WriteAllText(fileLoc, JsonConvert.SerializeObject(this, Formatting.Indented));

                Logging.Log.Info("Playlist saved!");
            }
            catch (Exception e)
            {
                Logging.Log.Critical("Unable to save playlist! Exception: " + e);
                yield break;
            }
        }

        public bool PlaylistEqual(object obj)
        {
            if (obj == null) return false;

            var playlist = obj as Playlist;

            if (playlist == null) return false;

            int songCountThis = (songs != null ? (songs.Count > 0 ? songs.Count : playlistSongCount) : playlistSongCount);
            int songCountObj = (playlist.songs != null ? (playlist.songs.Count > 0 ? playlist.songs.Count : playlist.playlistSongCount) : playlist.playlistSongCount);

            return playlistTitle == playlist.playlistTitle &&
                   playlistAuthor == playlist.playlistAuthor &&
                   songCountThis == songCountObj;
        }

    }

    public class PlaylistSong
    {
        public string key { get { if (_key == null) return ""; else return _key; } set { _key = value; } }
        private string _key;
        public string songName { get { if (_songName == null) return ""; else return _songName; } set { _songName = value; } }
        private string _songName;

        public string hash { get { if (_hash == null) return ""; else return _hash; } set { _hash = value; } }
        private string _hash;

        public string levelId { get { if (_levelId == null) return ""; else return _levelId; } set { _levelId = value; } }
        private string _levelId;

        [JsonIgnore]
        public CustomPreviewBeatmapLevel level { get { return _level; } set { if (_level != value) { _level = value; UpdateSongInfo(); } } }
        private CustomPreviewBeatmapLevel _level;

        private void UpdateSongInfo()
        {
            if (level != null)
            {
                songName = level.songName + " - " + level.levelAuthorName;
                levelId = level.levelID;
                //bananbread id customlevel
                hash = SongCore.Utilities.Hashing.GetCustomLevelHash(level);
            }
        }

    }
}

extension: cs


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Threading.Tasks;
using DevOidc.Business.Abstractions;
using DevOidc.Core.Models.Dtos;
using DevOidc.Repositories.Abstractions;
using DevOidc.Repositories.Commands.Tenant;
using DevOidc.Repositories.Entities;
using DevOidc.Repositories.Specifications.Tenant;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;

namespace DevOidc.Business.Tenant
{
    public class TenantManagementService : ITenantManagementService
    {
        private readonly IReadRepository<TenantEntity> _readRepository;
        private readonly ICommandHandler<CreateTenantCommand> _createTenantCommandHandler;
        private readonly ICommandHandler<DeleteTenantCommand> _deleteTenantCommandHandler;
        private readonly ICommandHandler<ClaimTenantCommand> _claimTenantCommandHandler;

        public TenantManagementService(
            IReadRepository<TenantEntity> readRepository,
            ICommandHandler<CreateTenantCommand> createTenantCommandHandler,
            ICommandHandler<DeleteTenantCommand> deleteTenantCommandHandler,
            ICommandHandler<ClaimTenantCommand> claimTenantCommandHandler)
        {
            _readRepository = readRepository;
            _createTenantCommandHandler = createTenantCommandHandler;
            _deleteTenantCommandHandler = deleteTenantCommandHandler;
            _claimTenantCommandHandler = claimTenantCommandHandler;
        }

        public async Task<string> CreateTenantAsync(string ownerName, TenantDto tenant)
        {
            var key = CreatePrivateKey();

            var command = new CreateTenantCommand(ownerName, tenant, GetStringFromKey(key.Public), GetStringFromKey(key.Private));
            await _createTenantCommandHandler.HandleAsync(command);

            return command.TenantId ?? throw new InvalidOperationException();
        }

        public async Task<IReadOnlyList<TenantDto>> GetTenantsAsync(string ownerName)
            => await _readRepository.GetListAsync(new GetAllTenantsSpecification(ownerName));

        public async Task<IReadOnlyList<TenantDto>> GetTenantsOfOthersAsync(string ownerName)
            => await _readRepository.GetListAsync(new GetAllOtherTenantsSpecification(ownerName));

        public async Task DeleteTenantAsync(string ownerName, string tenantId)
            => await _deleteTenantCommandHandler.HandleAsync(new DeleteTenantCommand(ownerName, tenantId));

        public async Task ClaimTenantAsync(string ownerName, string tenantId)
            => await _claimTenantCommandHandler.HandleAsync(new ClaimTenantCommand(ownerName, tenantId));

        private static string GetStringFromKey(AsymmetricKeyParameter param)
        {
            var keyWriter = new StringWriter();
            var pemWriter = new PemWriter(keyWriter);

            pemWriter.WriteObject(param);

            return keyWriter.ToString();
        }

        private static AsymmetricCipherKeyPair CreatePrivateKey()
        {
            using var rsaProvider = new RSACryptoServiceProvider(2048);
            var rsaKeyInfo = rsaProvider.ExportParameters(true);
            return DotNetUtilities.GetRsaKeyPair(rsaKeyInfo);
        }
    }
}

repository: ThomasBleijendaal/DevOIDC

repo_name: ThomasBleijendaal/DevOIDC

branch_name: refs/heads/main

gha_language: C#


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Vuforia;

public class FreezeTrackingHandler : DefaultTrackableEventHandler
{
    public Transform Controller;
    public Transform CameraTransform;

    private bool recalibrating = false;

    protected override void OnTrackingFound()
    {
        base.OnTrackingFound();
        Debug.Log(Controller.name);
        Controller.parent = null;
        CameraTransform.parent = Controller;
        CameraTransform.GetComponentInChildren<VuforiaMonoBehaviour>().enabled = false;
        this.enabled = false;

        mTrackableBehaviour = GetComponent<TrackableBehaviour>();
        if (mTrackableBehaviour)
            mTrackableBehaviour.UnregisterTrackableEventHandler(this);

    }

    public void Enable()
    {
        Debug.Log("Recalibrate!");
        Controller.parent = this.transform;
        Controller.transform.Find("Wall").localPosition = Vector3.zero;
        Controller.transform.Find("RecalibtationMarker").localPosition = Vector3.zero;
        Controller.transform.localPosition = Vector3.zero;
        Controller.transform.localRotation = Quaternion.Euler(90f, 0f, 0f);
        CameraTransform.parent = null;
        CameraTransform.GetComponentInChildren<VuforiaMonoBehaviour>().enabled = true;

        recalibrating = true;

        mTrackableBehaviour = GetComponent<TrackableBehaviour>();
        if (mTrackableBehaviour)
            mTrackableBehaviour.RegisterTrackableEventHandler(this);
    }

    private void Update()
    {
        Debug.Log(" Tracker " + m_PreviousStatus.ToString() + " " + m_NewStatus.ToString());
    }

    public override void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus, TrackableBehaviour.Status newStatus)
    {
        if(recalibrating && newStatus == TrackableBehaviour.Status.TRACKED)
        {
            m_PreviousStatus = previousStatus;
            m_NewStatus = newStatus;
            recalibrating = false;
            return;
        }

        base.OnTrackableStateChanged(previousStatus, newStatus);
    }
}


text:
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/data)
    set(BASE_URL "https://github.com/Fahien/ncJump/releases/download")
    set(JUMP_VERSION "2021.01")
    set(FILE_NAME "data.tar.gz")
    set(URL "${BASE_URL}/${JUMP_VERSION}/${FILE_NAME}")
    set(OUT "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_NAME}")
    file(DOWNLOAD ${URL} ${OUT})
    execute_process(
        COMMAND ${CMAKE_COMMAND} -E tar xzf ${FILE_NAME}
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    )
    file(REMOVE ${OUT})
    if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/data)
        message(FATAL_ERROR "Failed to download and unpack ${FILE_NAME}")
    endif()
endif()

repository: anggawasita/ncJump

repo_name: anggawasita/ncJump

extension: cmake


text:
/*
Copyright 2021 The Flux authors

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.
*/

package gogit

import (
	"context"
	"fmt"
	"io"
	"os"
	"path/filepath"
	"strings"
	"time"

	"github.com/ProtonMail/go-crypto/openpgp"
	gogit "github.com/go-git/go-git/v5"
	"github.com/go-git/go-git/v5/config"
	"github.com/go-git/go-git/v5/plumbing"
	"github.com/go-git/go-git/v5/plumbing/object"
	"github.com/go-git/go-git/v5/plumbing/transport"

	"github.com/fluxcd/flux2/internal/bootstrap/git"
)

type GoGit struct {
	path       string
	auth       transport.AuthMethod
	repository *gogit.Repository
}

type CommitOptions struct {
	GpgKeyPath       string
	GpgKeyPassphrase string
	KeyID            string
}

func New(path string, auth transport.AuthMethod) *GoGit {
	return &GoGit{
		path: path,
		auth: auth,
	}
}

func (g *GoGit) Init(url, branch string) (bool, error) {
	if g.repository != nil {
		return false, nil
	}

	r, err := gogit.PlainInit(g.path, false)
	if err != nil {
		return false, err
	}
	if _, err = r.CreateRemote(&config.RemoteConfig{
		Name: gogit.DefaultRemoteName,
		URLs: []string{url},
	}); err != nil {
		return false, err
	}
	branchRef := plumbing.NewBranchReferenceName(branch)
	if err = r.CreateBranch(&config.Branch{
		Name:   branch,
		Remote: gogit.DefaultRemoteName,
		Merge:  branchRef,
	}); err != nil {
		return false, err
	}
	// PlainInit assumes the initial branch to always be master, we can
	// overwrite this by setting the reference of the Storer to a new
	// symbolic reference (as there are no commits yet) that points
	// the HEAD to our new branch.
	if err = r.Storer.SetReference(plumbing.NewSymbolicReference(plumbing.HEAD, branchRef)); err != nil {
		return false, err
	}

	g.repository = r
	return true, nil
}

func (g *GoGit) Clone(ctx context.Context, url, branch string, caBundle []byte) (bool, error) {
	branchRef := plumbing.NewBranchReferenceName(branch)
	r, err := gogit.PlainCloneContext(ctx, g.path, false, &gogit.CloneOptions{
		URL:           url,
		Auth:          g.auth,
		RemoteName:    gogit.DefaultRemoteName,
		ReferenceName: branchRef,
		SingleBranch:  true,

		NoCheckout: false,
		Progress:   nil,
		Tags:       gogit.NoTags,
		CABundle:   caBundle,
	})
	if err != nil {
		if err == transport.ErrEmptyRemoteRepository || isRemoteBranchNotFoundErr(err, branchRef.String()) {
			return g.Init(url, branch)
		}
		return false, err
	}

	g.repository = r
	return true, nil
}

func (g *GoGit) Write(path string, reader io.Reader) error {
	if g.repository == nil {
		return git.ErrNoGitRepository
	}

	wt, err := g.repository.Worktree()
	if err != nil {
		return err
	}

	f, err := wt.Filesystem.Create(path)
	if err != nil {
		return err
	}
	defer f.Close()

	_, err = io.Copy(f, reader)
	return err
}

func (g *GoGit) Commit(message git.Commit, opts ...git.Option) (string, error) {
	if g.repository == nil {
		return "", git.ErrNoGitRepository
	}

	wt, err := g.repository.Worktree()
	if err != nil {
		return "", err
	}

	status, err := wt.Status()
	if err != nil {
		return "", err
	}

	// apply the options
	options := &git.CommitOptions{}
	for _, opt := range opts {
		opt.ApplyToCommit(options)
	}

	// go-git has [a bug](https://github.com/go-git/go-git/issues/253)
	// whereby it thinks broken symlinks to absolute paths are
	// modified. There's no circumstance in which we want to commit a
	// change to a broken symlink: so, detect and skip those.
	var changed bool
	for file, _ := range status {
		abspath := filepath.Join(g.path, file)
		info, err := os.Lstat(abspath)
		if err != nil {
			return "", fmt.Errorf("checking if %s is a symlink: %w", file, err)
		}
		if info.Mode()&os.ModeSymlink > 0 {
			// symlinks are OK; broken symlinks are probably a result
			// of the bug mentioned above, but not of interest in any
			// case.
			if _, err := os.Stat(abspath); os.IsNotExist(err) {
				continue
			}
		}
		_, _ = wt.Add(file)
		changed = true
	}

	if !changed {
		head, err := g.repository.Head()
		if err != nil {
			return "", err
		}
		return head.Hash().String(), git.ErrNoStagedFiles
	}

	commitOpts := &gogit.CommitOptions{
		Author: &object.Signature{
			Name:  message.Name,
			Email: message.Email,
			When:  time.Now(),
		},
	}

	if options.GPGSigningInfo != nil {
		entity, err := getOpenPgpEntity(*options.GPGSigningInfo)
		if err != nil {
			return "", err
		}

		commitOpts.SignKey = entity
	}

	commit, err := wt.Commit(message.Message, commitOpts)
	if err != nil {
		return "", err
	}
	return commit.String(), nil
}

func (g *GoGit) Push(ctx context.Context, caBundle []byte) error {
	if g.repository == nil {
		return git.ErrNoGitRepository
	}

	return g.repository.PushContext(ctx, &gogit.PushOptions{
		RemoteName: gogit.DefaultRemoteName,
		Auth:       g.auth,
		Progress:   nil,
		CABundle:   caBundle,
	})
}

func (g *GoGit) Status() (bool, error) {
	if g.repository == nil {
		return false, git.ErrNoGitRepository
	}
	wt, err := g.repository.Worktree()
	if err != nil {
		return false, err
	}
	status, err := wt.Status()
	if err != nil {
		return false, err
	}
	return status.IsClean(), nil
}

func (g *GoGit) Head() (string, error) {
	if g.repository == nil {
		return "", git.ErrNoGitRepository
	}
	head, err := g.repository.Head()
	if err != nil {
		return "", err
	}
	return head.Hash().String(), nil
}

func (g *GoGit) Path() string {
	return g.path
}

func isRemoteBranchNotFoundErr(err error, ref string) bool {
	return strings.Contains(err.Error(), fmt.Sprintf("couldn't find remote ref %q", ref))
}

func getOpenPgpEntity(info git.GPGSigningInfo) (*openpgp.Entity, error) {
	r, err := os.Open(info.KeyRingPath)
	if err != nil {
		return nil, fmt.Errorf("unable to open GPG key ring: %w", err)
	}

	entityList, err := openpgp.ReadKeyRing(r)
	if err != nil {
		return nil, err
	}

	if len(entityList) == 0 {
		return nil, fmt.Errorf("empty GPG key ring")
	}

	var entity *openpgp.Entity
	if info.KeyID != "" {
		for _, ent := range entityList {
			if ent.PrimaryKey.KeyIdString() == info.KeyID {
				entity = ent
			}
		}

		if entity == nil {
			return nil, fmt.Errorf("no GPG private key matching key id '%s' found", info.KeyID)
		}
	} else {
		entity = entityList[0]
	}

	err = entity.PrivateKey.Decrypt([]byte(info.Passphrase))
	if err != nil {
		return nil, fmt.Errorf("unable to decrypt GPG private key: %w", err)
	}

	return entity, nil
}


text:
package query

// Field defined physical or logical column
type Field interface {
	Named
	DataType() interface{}
	Sortable() bool
	Filterable() bool
}


text:
/**
 * Created by laixiangran on 2017/12/25.
 * homepage：http://www.laixiangran.cn.
 * 天地图服务类型常量
 */

export class TiandituMapsStyle {

	/**
	 * 天地图全球影像中文注记服务（经纬度投影）
	 * @type {string}
	 */
	static CIA_C: string = 'cia_c';

	/**
	 * 天地图全球影像中文注记服务（墨卡托投影）
	 * @type {string}
	 */
	static CIA_W: string = 'cia_w';

	/**
	 * 天地图全球地形中文注记服务（经纬度投影）
	 * @type {string}
	 */
	static CTA_C: string = 'cta_c';

	/**
	 * 天地图全球地形中文注记服务（墨卡托投影）
	 * @type {string}
	 */
	static CTA_W: string = 'cta_w';

	/**
	 * 天地图全球矢量中文标注服务（经纬度投影）
	 * @type {string}
	 */
	static CVA_C: string = 'cva_c';

	/**
	 * 天地图全球矢量中文标注服务（墨卡托投影）
	 * @type {string}
	 */
	static CVA_W: string = 'cva_w';

	/**
	 * 天地图全球影像英文注记服务（经纬度投影）
	 * @type {string}
	 */
	static EIA_C: string = 'eia_c';

	/**
	 * 天地图全球影像英文注记服务（墨卡托投影）
	 * @type {string}
	 */
	static EIA_W: string = 'eia_w';

	/**
	 * 天地图全球矢量英文标注服务（经纬度投影）
	 * @type {string}
	 */
	static EVA_C: string = 'eva_c';

	/**
	 * 天地图全球矢量英文标注服务（墨卡托投影）
	 * @type {string}
	 */
	static EVA_W: string = 'eva_w';

	/**
	 * 天地图全球影像地图服务（经纬度投影）
	 * @type {string}
	 */
	static IMG_C: string = 'img_c';

	/**
	 * 天地图全球影像地图服务（墨卡托投影）
	 * @type {string}
	 */
	static IMG_W: string = 'img_w';

	/**
	 * 天地图全球地形晕渲服务（经纬度投影）
	 * @type {string}
	 */
	static TER_C: string = 'ter_c';

	/**
	 * 天地图全球地形晕渲服务（墨卡托投影）
	 * @type {string}
	 */
	static TER_W: string = 'ter_w';

	/**
	 * 天地图全球矢量地图服务（经纬度投影）
	 * @type {string}
	 */
	static VEC_C: string = 'vec_c';

	/**
	 * 天地图全球矢量地图服务（墨卡托投影）
	 * @type {string}
	 */
	static VEC_W: string = 'vec_w';
}

extension: ts


text:
// Copyright (c) 2019 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#pragma once

#define COPYRIGHT_YEAR "${COPYRIGHT_YEAR}"

#define CLIENT_VERSION_MAJOR ${CLIENT_VERSION_MAJOR}
#define CLIENT_VERSION_MINOR ${CLIENT_VERSION_MINOR}
#define CLIENT_VERSION_REVISION ${CLIENT_VERSION_REVISION}
#define CLIENT_VERSION_BUILD ${CLIENT_VERSION_BUILD}
#define BUILD_SUFFIX "${BUILD_SUFFIX}"
#define BUILD_DESC "${BUILD_DESC}"
#cmakedefine01 BUILD_SUFFIX_DEFINED
#cmakedefine01 BUILD_DESC_DEFINED
#define CLIENT_VERSION_IS_RELEASE !BUILD_SUFFIX_DEFINED

repository: jonspock/devault

repo_name: jonspock/devault

branch_name: refs/heads/develop

extension: in


text:
namespace AvroConvertTests.Component
{
    using AutoFixture;
    using AvroConvert;
    using Xunit;

    public class ClassWithFieldsNotPropertiesTests
    {
        private readonly Fixture _fixture;

        public ClassWithFieldsNotPropertiesTests()
        {
            _fixture = new Fixture();
        }

        [Fact]
        public void Component_ClassWithoutGetters_ResultIsTheSameAsInput()
        {
            //Arrange
            ClassWithoutGetters toSerialize = _fixture.Create<ClassWithoutGetters>();

            //Act

            var result = AvroConvert.Serialize(toSerialize);

            var deserialized = AvroConvert.Deserialize<ClassWithoutGetters>(result);

            //Assert
            Assert.NotNull(result);
            Assert.NotNull(deserialized);
            Assert.Equal(toSerialize.Count, deserialized.Count);
            Assert.Equal(toSerialize.SomeString, deserialized.SomeString);
        }

        [Fact]
        public void Component_ComplexClassWithoutGetters_ResultIsTheSameAsInput()
        {
            //Arrange
            ComplexClassWithoutGetters toSerialize = _fixture.Create<ComplexClassWithoutGetters>();

            //Act

            var result = AvroConvert.Serialize(toSerialize);

            var deserialized = AvroConvert.Deserialize<ComplexClassWithoutGetters>(result);

            //Assert
            Assert.NotNull(result);
            Assert.NotNull(deserialized);
            Assert.Equal(toSerialize, deserialized);
        }

        [Fact]
        public void Component_ClassWithAttributesAndWithoutGetters_ResultIsTheSameAsInput()
        {
            //Arrange
            AttributeClassWithoutGetters toSerialize = _fixture.Create<AttributeClassWithoutGetters>();

            //Act
            var result = AvroConvert.Serialize(toSerialize);

            var deserialized = AvroConvert.Deserialize<AttributeClassWithoutGetters>(result);

            //Assert
            Assert.NotNull(result);
            Assert.NotNull(deserialized);
            Assert.Equal(toSerialize, deserialized);
        }
    }
}

repository: brandonwittwer/AvroConvert

repo_name: brandonwittwer/AvroConvert


text:
/*
Copyright 2012, Google Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
    * Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package tabletserver

import (
	"code.google.com/p/vitess/go/relog"
	"fmt"
)

const (
	FAIL = iota
	RETRY
	FATAL
)

const (
	DUPLICATE_KEY = 1062 // MySQL error number
)

type TabletError struct {
	ErrorType int
	Message   string
	SqlError  int
}

// This is how go-mysql exports its error number
type hasNumber interface {
	Number() int
}

func NewTabletError(errorType int, format string, args ...interface{}) *TabletError {
	return &TabletError{errorType, fmt.Sprintf(format, args...), 0}
}

func NewTabletErrorSql(errorType int, err error) *TabletError {
	self := NewTabletError(errorType, "%s", err)
	if sqlErr, ok := err.(hasNumber); ok {
		self.SqlError = sqlErr.Number()
	}
	return self
}

func (self *TabletError) Error() string {
	format := "error: %s"
	switch self.ErrorType {
	case RETRY:
		format = "retry: %s"
	case FATAL:
		format = "fatal: %s"
	}
	return fmt.Sprintf(format, self.Message)
}

func (self *TabletError) RecordStats() {
	switch self.ErrorType {
	case RETRY:
		errorStats.Add("Retry", 1)
	case FATAL:
		errorStats.Add("Fatal", 1)
	default:
		if self.SqlError == DUPLICATE_KEY {
			errorStats.Add("DupKey", 1)
		} else {
			errorStats.Add("Fail", 1)
		}
	}
}

func handleError(err *error) {
	if x := recover(); x != nil {
		terr := x.(*TabletError)
		*err = terr
		terr.RecordStats()
		if terr.ErrorType == RETRY { // Retry errors are too spammy
			return
		}
		relog.Error("%s", terr.Message)
	}
}

func logError() {
	if x := recover(); x != nil {
		relog.Error("%s", x.(*TabletError).Message)
	}
}

repository: seacoastboy/vitess

repo_name: seacoastboy/vitess