text:
layer="95" rot="R90"/>
<attribute name="VALUE" x="-32.512" y="110.49" size="1.778" layer="96" rot="R90"/>
</instance>
<instance part="R9" gate="G$1" x="-58.42" y="144.78" rot="R180"/>
<instance part="C25" gate="G$1" x="-27.94" y="106.68" rot="R180"/>
<instance part="JP6" gate="G$1" x="-25.4" y="71.12" smashed="yes" rot="R180">
<attribute name="NAME" x="-19.05" y="65.405" size="1.778" layer="95" rot="R180"/>
</instance>
<instance part="JP9" gate="G$1" x="-97.282" y="123.952"/>
<instance part="JP10" gate="G$1" x="-97.282" y="134.62"/>
<instance part="R10" gate="G$1" x="-29.21" y="83.82" rot="MR0"/>
</instances>
<busses>
</busses>
<nets>
<net name="GND" class="0">
<segment>
<pinref part="R2" gate="G$1" pin="1"/>
<pinref part="SUPPLY4" gate="1" pin="GND"/>
</segment>
<segment>
<pinref part="JP6" gate="G$1" pin="4"/>
<wire x1="-22.86" y1="76.2" x2="-40.64" y2="76.2" width="0.1524" layer="91"/>
<pinref part="JP5" gate="A" pin="7"/>
<pinref part="SUPPLY3" gate="1" pin="GND"/>
<junction x="-36.576" y="81.28"/>
<pinref part="C1" gate="G$1" pin="1"/>
<pinref part="S1" gate="G$1" pin="10"/>
<pinref part="S1" gate="G$1" pin="6"/>
<pinref part="S1" gate="G$1" pin="8"/>
<wire x1="-58.42" y1="81.28" x2="-66.04" y2="81.28" width="0.1524" layer="91"/>
<wire x1="-58.42" y1="81.28" x2="-55.88" y2="81.28" width="0.1524" layer="91"/>
<junction x="-60.96" y="81.28"/>
<pinref part="S1" gate="G$1" pin="7"/>
<wire x1="-63.5" y1="81.28" x2="-60.96" y2="81.28" width="0.1524" layer="91"/>
<wire x1="-60.96" y1="81.28" x2="-58.42" y2="81.28" width="0.1524" layer="91"/>
<junction x="-58.42" y="81.28"/>
<pinref part="S1" gate="G$1" pin="9"/>
<wire x1="-66.04" y1="81.28" x2="-63.5" y2="81.28" width="0.1524" layer="91"/>
<junction x="-63.5" y="81.28"/>
<wire x1="-55.88" y1="81.28" x2="-50.8" y2="81.28" width="0.1524" layer="91"/>
<junction x="-55.88" y="81.28"/>
<wire x1="-50.8" y1="81.28" x2="-43.18" y2="81.28" width="0.1524" layer="91"/>
<wire x1="-43.18" y1="81.28" x2="-40.64" y2="81.28" width="0.1524" layer="91"/>
<wire x1="-40.64" y1="81.28" x2="-36.576" y2="81.28" width="0.1524" layer="91"/>
<wire x1="-48.26" y1="58.42" x2="-48.26" y2="72.136" width="0.1524" layer="91"/>
<wire x1="-86.36" y1="86.36" x2="-86.36" y2="81.28" width="0.1524" layer="91"/>
<junction x="-86.36" y="81.28"/>
<junction x="-66.04" y="81.28"/>
<wire x1="-86.36" y1="81.28" x2="-66.04" y2="81.28" width="0.1524" layer="91"/>
<pinref part="JP2" gate="A" pin="4"/>
<label x="-48.26" y="66.04" size="1.778" layer="95" rot="R270"/>
<pinref part="S2" gate="G$1" pin="2"/>
<wire x1="-36.576" y1="83.82" x2="-36.576" y2="81.28" width="0.1524" layer="91"/>
<pinref part="JP3" gate="A" pin="2"/>
<wire x1="-43.18" y1="86.36" x2="-43.18" y2="93.98" width="0.1524" layer="91"/>
<label x="-43.18" y="93.98" size="1.778" layer="95" rot="R270"/>
<wire x1="-43.18" y1="86.36" x2="-43.18" y2="81.28" width="0.1524" layer="91"/>
<junction x="-43.18" y="86.36"/>
<junction x="-43.18" y="81.28"/>
<wire x1="-48.26" y1="72.136" x2="-50.8" y2="72.136" width="0.1524" layer="91"/>
<wire x1="-50.8" y1="72.136" x2="-50.8" y2="81.28" width="0.1524" layer="91"/>
<junction x="-50.8" y="81.28"/>
<wire x1="-40.64" y1="76.2" x2="-40.64" y2="81.28" width="0.1524" layer="91"/>
<junction x="-40.64" y="81.28"/>
</segment>
<segment>
<pinref part="C25" gate="G$1" pin="1"/>
<pinref part="C22" gate="G$1" pin="1"/>
<pinref part="C21" gate="G$1" pin="1"/>
<pinref part="C20" gate="G$1" pin="1"/>
<pinref part="C23" gate="G$1" pin="1"/>
<pinref part="SUPPLY2" gate="1" pin="GND"/>
<pinref part="IC1" gate="G$1" pin="GND"/>
<junction x="-63.5" y="104.14"/>
<pinref part="R4" gate="G$1" pin="1"/>
<pinref part="GND" gate="G$1" pin="TP"/>
<pinref part="R6" gate="G$1" pin="1"/>
<wire x1="-63.5" y1="104.14" x2="-71.12" y2="104.14" width="0.1524" layer="91"/>
<wire x1="-71.12" y1="104.14" x2="-73.66" y2="104.14" width="0.1524" layer="91"/>
<wire x1="-73.66" y1="104.14" x2="-81.28" y2="104.14" width="0.1524" layer="91"/>
<wire x1="-81.28" y1="104.14" x2="-88.9" y2="104.14" width="0.1524" layer="91"/>
<wire x1="-88.9" y1="104.14" x2="-96.52" y2="104.14" width="0.1524" layer="91"/>
<wire x1="-96.52" y1="104.14" x2="-96.52" y2="106.68" width="0.1524" layer="91"/>
<wire x1="-88.9" y1="106.68" x2="-88.9" y2="104.14" width="0.1524" layer="91"/>
<junction x="-88.9" y="104.14"/>
<wire x1="-81.28" y1="106.68" x2="-81.28" y2="104.14" width="0.1524" layer="91"/>
<junction x="-81.28" y="104.14"/>
<wire x1="-73.66" y1="106.68" x2="-73.66" y2="104.14" width="0.1524" layer="91"/>
<junction x="-73.66" y="104.14"/>
<junction x="-25.4" y="121.92"/>
<wire x1="-27.94" y1="104.14" x2="-63.5" y2="104.14" width="0.1524" layer="91"/>
<wire x1="-71.12" y1="109.22" x2="-71.12" y2="104.14" width="0.1524" layer="91"/>
<junction x="-71.12" y="104.14"/>
<wire x1="-22.86" y1="104.14" x2="-25.4" y2="104.14" width="0.1524" layer="91"/>
<wire x1="-25.4" y1="104.14" x2="-27.94" y2="104.14" width="0.1524" layer="91"/>
<junction x="-27.94" y="104.14"/>
<junction x="-27.94" y="104.14"/>
<wire x1="-25.4" y1="121.92" x2="-25.4" y2="104.14" width="0.1524" layer="91"/>
<junction x="-25.4" y="104.14"/>
</segment>
</net>
<net name="VCCA" class="0">
<segment>
<pinref part="JP3" gate="A" pin="4"/>
<label x="-48.26" y="93.98" size="1.778" layer="95" rot="R270"/>
<wire x1="-48.26" y1="86.36" x2="-48.26" y2="105.918" width="0.1524" layer="91"/>
<pinref part="IC1" gate="G$1" pin="OUT"/>
<pinref part="C24" gate="G$1" pin="2"/>
<junction x="-43.18" y="109.22"/>
<label x="-43.18" y="109.22" size="1.778" layer="95" rot="R180"/>
<pinref part="R8" gate="G$1" pin="1"/>
<pinref part="C25" gate="G$1" pin="2"/>
<wire x1="-43.18" y1="109.22" x2="-45.72" y2="109.22" width="0.1524" layer="91"/>
<wire x1="-35.814" y1="109.22" x2="-34.036" y2="109.22" width="0.1524" layer="91"/>
<junction x="-35.814" y="109.22"/>
<wire x1="-43.18" y1="109.22" x2="-35.814" y2="109.22" width="0.1524" layer="91"/>
<wire x1="-43.18" y1="106.68" x2="-43.18" y2="109.22" width="0.1524" layer="91"/>
<pinref part="R7" gate="G$1" pin="1"/>
<wire x1="-27.94" y1="111.76" x2="-15.24" y2="111.76" width="0.1524" layer="91"/>
<junction x="-27.94" y="111.76"/>
<wire x1="-48.26" y1="86.36" x2="-48.26" y2="73.66" width="0.1524" layer="91"/>
<junction x="-48.26" y="86.36"/>
<label x="-45.72" y="73.66" size="1.778" layer="95"/>
<pinref part="JP6" gate="G$1" pin="3"/>
<wire x1="-22.86" y1="73.66" x2="-48.26" y2="73.66" width="0.1524" layer="91"/>
<wire x1="-48.26" y1="86.36" x2="-48.26" y2="106.68" width="0.1524" layer="91"/>
<wire x1="-48.26" y1="106.68" x2="-43.18" y2="106.68" width="0.1524" layer="91"/>
<wire x1="-27.94" y1="111.76" x2="-34.036" y2="111.76" width="0.1524" layer="91"/>
<wire x1="-34.036" y1="111.76" x2="-34.036" y2="109.22" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D10" class="0">
<segment>
<pinref part="JP5" gate="A" pin="5"/>
<wire x1="-86.36" y1="78.74" x2="-71.12" y2="78.74" width="0.1524" layer="91"/>
<pinref part="JP2" gate="A" pin="13"/>
<label x="-71.12" y="66.04" size="1.778" layer="95" rot="R270"/>
<wire x1="-71.12" y1="78.74" x2="-71.12" y2="58.42" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D13" class="0">
<segment>
<pinref part="JP5" gate="A" pin="3"/>
<wire x1="-86.36" y1="76.2" x2="-76.2" y2="76.2" width="0.1524" layer="91"/>
<label x="-76.2" y="76.2" size="1.778" layer="95" rot="R180"/>
<pinref part="JP3" gate="A" pin="15"/>
<wire x1="-76.2" y1="86.36" x2="-76.2" y2="76.2" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D12" class="0">
<segment>
<pinref part="JP2" gate="A" pin="15"/>
<label x="-76.2" y="73.66" size="1.778" layer="95" rot="R270"/>
<pinref part="JP5" gate="A" pin="1"/>
<wire x1="-86.36" y1="73.66" x2="-76.2" y2="73.66" width="0.1524" layer="91"/>
<wire x1="-76.2" y1="58.42" x2="-76.2" y2="73.66" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D9" class="0">
<segment>
<pinref part="JP2" gate="A" pin="12"/>
<label x="-68.58" y="66.04" size="1.778" layer="95" rot="R270"/>
<pinref part="JP5" gate="A" pin="6"/>
<wire x1="-93.98" y1="78.74" x2="-99.06" y2="78.74" width="0.1524" layer="91"/>
<wire x1="-99.06" y1="78.74" x2="-99.06" y2="68.58" width="0.1524" layer="91"/>
<wire x1="-99.06" y1="68.58" x2="-68.58" y2="68.58" width="0.1524" layer="91"/>
<wire x1="-68.58" y1="58.42" x2="-68.58" y2="68.58" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D11" class="0">
<segment>
<pinref part="JP5" gate="A" pin="4"/>
<wire x1="-93.98" y1="76.2" x2="-101.6" y2="76.2" width="0.1524" layer="91"/>
<wire x1="-101.6" y1="76.2" x2="-101.6" y2="66.04" width="0.1524" layer="91"/>
<wire x1="-101.6" y1="66.04" x2="-73.66" y2="66.04" width="0.1524" layer="91"/>
<pinref part="JP2" gate="A" pin="14"/>
<wire x1="-73.66" y1="58.42" x2="-73.66" y2="66.04" width="0.1524" layer="91"/>
<label x="-73.66" y="66.04" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="RAW+" class="0">
<segment>
<pinref part="IC2" gate="G$1" pin="ON/!OFF"/>
<pinref part="IC2" gate="G$1" pin="IN"/>
<wire x1="-73.66" y1="129.54" x2="-66.04" y2="129.54" width="0.1524" layer="91"/>
<wire x1="-73.66" y1="129.54" x2="-81.28" y2="129.54" width="0.1524" layer="91"/>
<wire x1="-81.28" y1="129.54" x2="-88.9" y2="129.54" width="0.1524" layer="91"/>
<pinref part="C10" gate="G$1" pin="2"/>
<pinref part="R1" gate="G$1" pin="2"/>
<pinref part="C13" gate="G$1" pin="2"/>
<pinref part="C12" gate="G$1" pin="2"/>
<junction x="-73.66" y="129.54"/>
<pinref part="C11" gate="G$1" pin="2"/>
<junction x="-81.28" y="129.54"/>
<pinref part="R3" gate="G$1" pin="2"/>
<label x="-80.772" y="129.54" size="1.778" layer="95"/>
<pinref part="R9" gate="G$1" pin="2"/>
<wire x1="-104.14" y1="144.78" x2="-91.44" y2="144.78" width="0.1524" layer="91"/>
<wire x1="-88.9" y1="129.54" x2="-91.44" y2="129.54" width="0.1524" layer="91"/>
<wire x1="-91.44" y1="129.54" x2="-91.44" y2="134.62" width="0.1524" layer="91"/>
<junction x="-88.9" y="129.54"/>
<wire x1="-91.44" y1="134.62" x2="-88.9" y2="134.62" width="0.1524" layer="91"/>
<wire x1="-91.44" y1="134.62" x2="-91.44" y2="139.7" width="0.1524" layer="91"/>
<junction x="-91.44" y="134.62"/>
<wire x1="-91.44" y1="139.7" x2="-88.9" y2="139.7" width="0.1524" layer="91"/>
<wire x1="-91.44" y1="144.78" x2="-63.5" y2="144.78" width="0.1524" layer="91"/>
<junction x="-91.44" y="144.78"/>
<wire x1="-91.44" y1="144.78" x2="-91.44" y2="139.7" width="0.1524" layer="91"/>
<junction x="-91.44" y="139.7"/>
<wire x1="-104.14" y1="119.38" x2="-104.14" y2="123.952" width="0.1524" layer="91"/>
<wire x1="-104.14" y1="123.952" x2="-104.14" y2="144.78" width="0.1524" layer="91"/>
<wire x1="-104.14" y1="119.38" x2="-91.44" y2="119.38" width="0.1524" layer="91"/>
<junction x="-104.14" y="119.38"/>
<wire x1="-104.14" y1="119.38" x2="-104.14" y2="106.68" width="0.1524" layer="91"/>
<wire x1="-104.14" y1="106.68" x2="-101.6" y2="106.68" width="0.1524" layer="91"/>
<label x="-104.14" y="116.84" size="1.778" layer="95"/>
<pinref part="JP9" gate="G$1" pin="2"/>
<wire x1="-99.822" y1="123.952" x2="-104.14" y2="123.952" width="0.1524" layer="91"/>
<junction x="-104.14" y="123.952"/>
</segment>
</net>
<net name="5V" class="0">
<segment>
<pinref part="IC2" gate="G$1" pin="VOUT"/>
<pinref part="T1" gate="G$1" pin="+VIN_(VCC)"/>
<pinref part="C16" gate="G$1" pin="2"/>
<pinref part="C14" gate="G$1" pin="2"/>
<pinref part="X1" gate="G$1" pin="VBUS"/>
<pinref part="JP8" gate="G$1" pin="1"/>
<label x="-48.26" y="144.78" size="1.778" layer="95" rot="R180"/>
<wire x1="-58.42" y1="134.62" x2="-58.42" y2="129.54" width="0.1524" layer="91"/>
<junction x="-58.42" y="134.62"/>
<pinref part="R9" gate="G$1" pin="1"/>
<wire x1="-48.26" y1="144.78" x2="-53.34" y2="144.78" width="0.1524" layer="91"/>
<junction x="-58.42" y="134.62"/>
<wire x1="-48.26" y1="144.78" x2="-43.18" y2="144.78" width="0.1524" layer="91"/>
<wire x1="-43.18" y1="139.7" x2="-43.18" y2="144.78" width="0.1524" layer="91"/>
<wire x1="-58.42" y1="134.62" x2="-58.42" y2="137.16" width="0.1524" layer="91"/>
<wire x1="-58.42" y1="137.16" x2="-48.26" y2="137.16" width="0.1524" layer="91"/>
<junction x="-58.42" y="137.16"/>
<wire x1="-48.26" y1="137.16" x2="-48.26" y2="144.78" width="0.1524" layer="91"/>
<junction x="-48.26" y="144.78"/>
<wire x1="-33.782" y1="144.78" x2="-37.846" y2="144.78" width="0.1524" layer="91"/>
<wire x1="-37.846" y1="144.78" x2="-43.18" y2="144.78" width="0.1524" layer="91"/>
<junction x="-43.18" y="144.78"/>
<wire x1="-40.64" y1="129.54" x2="-37.846" y2="129.54" width="0.1524" layer="91"/>
<wire x1="-37.846" y1="129.54" x2="-37.846" y2="144.78" width="0.1524" layer="91"/>
<junction x="-37.846" y="144.78"/>
</segment>
</net>
<net name="SCL" class="0">
<segment>
<label x="-30.48" y="93.98" size="1.778" layer="95"/>
<pinref part="JP3" gate="A" pin="7"/>
<wire x1="-55.88" y1="86.36" x2="-55.88" y2="99.06" width="0.1524" layer="91"/>
<label x="-55.88" y="93.98" size="1.778" layer="95" rot="R270"/>
<wire x1="-55.88" y1="99.06" x2="-33.02" y2="99.06" width="0.1524" layer="91"/>
<wire x1="-33.02" y1="99.06" x2="-33.02" y2="93.98" width="0.1524" layer="91"/>
<pinref part="JP4" gate="G$1" pin="5"/>
<wire x1="-25.4" y1="93.98" x2="-33.02" y2="93.98" width="0.1524" layer="91"/>
</segment>
</net>
<net name="SDA" class="0">
<segment>
<pinref part="JP3" gate="A" pin="8"/>
<label x="-58.42" y="93.98" size="1.778" layer="95" rot="R270"/>
<wire x1="-58.42" y1="86.36" x2="-58.42" y2="101.6" width="0.1524" layer="91"/>
<label x="-30.48" y="99.06" size="1.778" layer="95"/>
<wire x1="-30.48" y1="99.06" x2="-30.48" y2="101.6" width="0.1524" layer="91"/>
<wire x1="-30.48" y1="101.6" x2="-58.42" y2="101.6" width="0.1524" layer="91"/>
<pinref part="JP4" gate="G$1" pin="1"/>
<wire x1="-25.4" y1="99.06" x2="-30.48" y2="99.06" width="0.1524" layer="91"/>
</segment>
</net>
<net name="-12V" class="0">
<segment>
<pinref part="T1" gate="G$1" pin="-VOUT"/>
<pinref part="JP7" gate="A" pin="3"/>
<junction x="-33.782" y="139.7"/>
<wire x1="-33.782" y1="139.7" x2="-33.782" y2="132.08" width="0.1524" layer="91"/>
<pinref part="C30" gate="G$1" pin="1"/>
<junction x="-33.782" y="132.08"/>
<wire x1="2.54" y1="124.46" x2="2.54" y2="93.98" width="0.1524" layer="91"/>
<pinref part="SUPPLY10" gate="G$1" pin="-12V"/>
<pinref part="JP4" gate="G$1" pin="6"/>
<wire x1="2.54" y1="93.98" x2="-5.08" y2="93.98" width="0.1524" layer="91"/>
<junction x="-5.08" y="93.98"/>
<junction x="-7.62" y="124.46"/>
<wire x1="-33.782" y1="132.08" x2="-33.782" y2="127" width="0.1524" layer="91"/>
<wire x1="-33.782" y1="127" x2="-12.7" y2="127" width="0.1524" layer="91"/>
<wire x1="-12.7" y1="127" x2="-12.7" y2="124.46" width="0.1524" layer="91"/>
<wire x1="-7.62" y1="124.46" x2="2.54" y2="124.46" width="0.1524" layer="91"/>
<wire x1="-7.62" y1="124.46" x2="-12.7" y2="124.46" width="0.1524" layer="91"/>
</segment>
</net>
<net name="+12V" class="0">
<segment>
<pinref part="SUPPLY7" gate="+12V" pin="+12V"/>
<pinref part="JP4" gate="G$1" pin="2"/>
<pinref part="T1" gate="G$1" pin="+VOUT"/>
<pinref part="C31" gate="G$1" pin="1"/>
<pinref part="JP7" gate="A" pin="1"/>
<pinref part="R5" gate="G$1" pin="2"/>
<wire x1="4.318" y1="132.08" x2="4.318" y2="142.24" width="0.1524" layer="91"/>
<junction x="4.318" y="132.08"/>
<wire x1="4.318" y1="132.08" x2="4.318" y2="119.38" width="0.1524" layer="91"/>
<wire x1="4.318" y1="119.38" x2="0" y2="119.38" width="0.1524" layer="91"/>
<wire x1="0" y1="119.38" x2="-7.62" y2="119.38" width="0.1524" layer="91"/>
<wire x1="4.318" y1="99.06" x2="4.318" y2="119.38" width="0.1524" layer="91"/>
<junction x="4.318" y="119.38"/>
<pinref part="+12V" gate="G$1" pin="TP"/>
<wire x1="-5.08" y1="99.06" x2="4.318" y2="99.06" width="0.1524" layer="91"/>
<junction x="-5.08" y="99.06"/>
<junction x="-7.62" y="119.38"/>
<wire x1="-12.7" y1="119.38" x2="-7.62" y2="119.38" width="0.1524" layer="91"/>
<wire x1="0" y1="116.84" x2="0" y2="119.38" width="0.1524" layer="91"/>
<junction x="0" y="119.38"/>
</segment>
</net>
<net name="N$14" class="0">
<segment>
<pinref part="IC1" gate="G$1" pin="BYP"/>
<pinref part="C24" gate="G$1" pin="1"/>
<wire x1="-43.18" y1="116.84" x2="-45.72" y2="116.84" width="0.1524" layer="91"/>
<wire x1="-45.72" y1="116.84" x2="-45.72" y2="114.3" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$20" class="0">
<segment>
<pinref part="C15" gate="G$1" pin="2"/>
<pinref part="IC2" gate="G$1" pin="BYPASS"/>
<pinref part="C14" gate="G$1" pin="1"/>
<wire x1="-50.8" y1="134.62" x2="-50.8" y2="129.54" width="0.1524" layer="91"/>
<junction x="-50.8" y="134.62"/>
<wire x1="-50.8" y1="134.62" x2="-50.8" y2="139.7" width="0.1524" layer="91"/>
<wire x1="-50.8" y1="139.7" x2="-58.42" y2="139.7" width="0.1524" layer="91"/>
</segment>
</net>
<net name="COMN" class="0">
<segment>
<label x="-30.48" y="96.52" size="1.778" layer="95"/>
<wire x1="-30.48" y1="96.52" x2="-25.4" y2="96.52" width="0.1524" layer="91"/>
<pinref part="JP4" gate="G$1" pin="3"/>
</segment>
<segment>
<pinref part="T1" gate="G$1" pin="COMMON"/>
<pinref part="C31" gate="G$1" pin="2"/>
<pinref part="R6" gate="G$1" pin="2"/>
<pinref part="JP7" gate="A" pin="2"/>
<pinref part="C30" gate="G$1" pin="2"/>
<wire x1="5.588" y1="144.78" x2="4.318" y2="144.78" width="0.1524" layer="91"/>
<wire x1="-26.162" y1="132.08" x2="-22.86" y2="132.08" width="0.1524" layer="91"/>
<wire x1="-22.86" y1="132.08" x2="-5.08" y2="132.08" width="0.1524" layer="91"/>
<pinref part="COMN" gate="G$1" pin="TP"/>
<junction x="-22.86" y="132.08"/>
<wire x1="-5.08" y1="132.08" x2="-3.302" y2="132.08" width="0.1524" layer="91"/>
<wire x1="5.588" y1="139.7" x2="5.588" y2="144.78" width="0.1524" layer="91"/>
<wire x1="-5.08" y1="134.62" x2="0" y2="134.62" width="0.1524" layer="91"/>
<wire x1="0" y1="134.62" x2="0" y2="139.7" width="0.1524" layer="91"/>
<wire x1="0" y1="139.7" x2="5.588" y2="139.7" width="0.1524" layer="91"/>
<junction x="-22.86" y="132.08"/>
<wire x1="-15.24" y1="121.92" x2="-7.62" y2="121.92" width="0.1524" layer="91"/>
<junction x="-7.62" y="121.92"/>
<wire x1="-7.62" y1="121.92" x2="-5.08" y2="121.92" width="0.1524" layer="91"/>
<wire x1="-5.08" y1="121.92" x2="-5.08" y2="132.08" width="0.1524" layer="91"/>
<junction x="-5.08" y="132.08"/>
<wire x1="-5.08" y1="132.08" x2="-5.08" y2="134.62" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D8" class="0">
<segment>
<pinref part="JP2" gate="A" pin="11"/>
<label x="-66.04" y="66.04" size="1.778" layer="95" rot="R270"/>
<pinref part="S1" gate="G$1" pin="1"/>
<wire x1="-66.04" y1="58.42" x2="-66.04" y2="66.04" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D7" class="0">
<segment>
<pinref part="S1" gate="G$1" pin="2"/>
<pinref part="JP2" gate="A" pin="10"/>
<label x="-63.5" y="66.04" size="1.778" layer="95" rot="R270"/>
<wire x1="-63.5" y1="66.04" x2="-63.5" y2="58.42" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D6" class="0">
<segment>
<pinref part="S1" gate="G$1" pin="3"/>
<pinref part="JP2" gate="A" pin="9"/>
<label x="-60.96" y="66.04" size="1.778" layer="95" rot="R270"/>
<wire x1="-60.96" y1="66.04" x2="-60.96" y2="58.42" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D5" class="0">
<segment>
<pinref part="S1" gate="G$1" pin="4"/>
<pinref part="JP2" gate="A" pin="8"/>
<label x="-58.42" y="66.04" size="1.778" layer="95" rot="R270"/>
<wire x1="-58.42" y1="66.04" x2="-58.42" y2="58.42" width="0.1524" layer="91"/>
</segment>
</net>
<net name="D4" class="0">
<segment>
<pinref part="S1" gate="G$1" pin="5"/>
<pinref part="JP2" gate="A" pin="7"/>
<label x="-55.88" y="66.04" size="1.778" layer="95" rot="R270"/>
<wire x1="-55.88" y1="66.04" x2="-55.88" y2="58.42" width="0.1524" layer="91"/>
</segment>
</net>
<net name="VCC" class="0">
<segment>
<pinref part="IC1" gate="G$1" pin="!SHDN"/>
<pinref part="IC1" gate="G$1" pin="IN"/>
<pinref part="C22" gate="G$1" pin="2"/>
<pinref part="VCC" gate="G$1" pin="TP"/>
<pinref part="C23" gate="G$1" pin="2"/>
<pinref part="C20" gate="G$1" pin="2"/>
<junction x="-73.66" y="114.3"/>
<pinref part="C21" gate="G$1" pin="2"/>
<junction x="-81.28" y="114.3"/>
<pinref part="R3" gate="G$1" pin="1"/>
<pinref part="R5" gate="G$1" pin="1"/>
<junction x="-81.28" y="114.3"/>
<junction x="-88.9" y="114.3"/>
<wire x1="-73.66" y1="114.3" x2="-81.28" y2="114.3" width="0.1524" layer="91"/>
<wire x1="-81.28" y1="114.3" x2="-88.9" y2="114.3" width="0.1524" layer="91"/>
<wire x1="-73.66" y1="114.3" x2="-71.12" y2="114.3" width="0.1524" layer="91"/>
<wire x1="-71.12" y1="111.76" x2="-71.12" y2="114.3" width="0.1524" layer="91"/>
<junction x="-71.12" y="114.3"/>
<pinref part="R8" gate="G$1" pin="2"/>
<wire x1="-81.28" y1="119.38" x2="-73.66" y2="119.38" width="0.1524" layer="91"/>
<junction x="-35.814" y="119.38"/>
<wire x1="-73.66" y1="119.38" x2="-35.814" y2="119.38" width="0.1524" layer="91"/>
<wire x1="-96.52" y1="114.3" x2="-88.9" y2="114.3" width="0.1524" layer="91"/>
<wire x1="-22.86" y1="119.38" x2="-28.702" y2="119.38" width="0.1524" layer="91"/>
<wire x1="-28.702" y1="119.38" x2="-35.814" y2="119.38" width="0.1524" layer="91"/>
<wire x1="-73.66" y1="114.3" x2="-73.66" y2="119.38" width="0.1524" layer="91"/>
<junction x="-73.66" y="119.38"/>
<junction x="-28.702" y="119.38"/>
<label x="-78.74" y="114.3" size="1.778" layer="95"/>
</segment>
<segment>
<pinref part="R10" gate="G$1" pin="1"/>
<wire x1="-24.13" y1="83.82" x2="-22.86" y2="83.82" width="0.1524" layer="91"/>
<label x="-22.86" y="83.82" size="1.778" layer="95"/>
</segment>
</net>
<net name="RAW-" class="0">
<segment>
<pinref part="IC2" gate="G$1" pin="GND"/>
<pinref part="T1" gate="G$1" pin="-VIN_(GND)"/>
<pinref part="C10" gate="G$1" pin="1"/>
<pinref part="C15" gate="G$1" pin="1"/>
<pinref part="C16" gate="G$1" pin="1"/>
<wire x1="-88.9" y1="121.92" x2="-81.28" y2="121.92" width="0.1524" layer="91"/>
<junction x="-88.9" y="121.92"/>
<pinref part="X1" gate="G$1" pin="GND"/>
<wire x1="-66.04" y1="121.92" x2="-73.66" y2="121.92" width="0.1524" layer="91"/>
<pinref part="RAW-" gate="G$1" pin="TP"/>
<pinref part="C13" gate="G$1" pin="1"/>
<junction x="-66.04" y="121.92"/>
<pinref part="C12" gate="G$1" pin="1"/>
<junction x="-73.66" y="121.92"/>
<pinref part="C11" gate="G$1" pin="1"/>
<junction x="-45.72" y="121.92"/>
<pinref part="R4" gate="G$1" pin="2"/>
<wire x1="-33.782" y1="142.24" x2="-35.56" y2="142.24" width="0.1524" layer="91"/>
<wire x1="-38.1" y1="121.92" x2="-35.56" y2="121.92" width="0.1524" layer="91"/>
<wire x1="-35.56" y1="142.24" x2="-35.56" y2="121.92" width="0.1524" layer="91"/>
<junction x="-35.56" y="121.92"/>
<wire x1="-50.8" y1="121.92" x2="-58.42" y2="121.92" width="0.1524" layer="91"/>
<junction x="-50.8" y="121.92"/>
<wire x1="-50.8" y1="121.92" x2="-45.72" y2="121.92" width="0.1524" layer="91"/>
<wire x1="-45.72" y1="121.92" x2="-38.1" y2="121.92" width="0.1524" layer="91"/>
<wire x1="-88.9" y1="121.92" x2="-94.996" y2="121.92" width="0.1524" layer="91"/>
<wire x1="-94.996" y1="121.92" x2="-94.996" y2="137.16" width="0.1524" layer="91"/>
<wire x1="-40.64" y1="127" x2="-38.1" y2="127" width="0.1524" layer="91"/>
<wire x1="-38.1" y1="127" x2="-38.1" y2="121.92" width="0.1524" layer="91"/>
<junction x="-38.1" y="121.92"/>
<wire x1="-73.66" y1="121.92" x2="-81.28" y2="121.92" width="0.1524" layer="91"/>
<junction x="-81.28" y="121.92"/>
<wire x1="-66.04" y1="121.92" x2="-58.42" y2="121.92" width="0.1524" layer="91"/>
<junction x="-58.42" y="121.92"/>
<pinref part="JP10" gate="G$1" pin="1"/>
<wire x1="-99.822" y1="137.16" x2="-94.996" y2="137.16" width="0.1524" layer="91"/>
<junction x="-94.996" y="137.16"/>
<wire x1="-88.9" y1="137.16" x2="-94.996" y2="137.16" width="0.1524" layer="91"/>
</segment>
</net>
<net name="TRIGGER" class="0">
<segment>
<label x="-45.72" y="68.58" size="1.778" layer="95"/>
<pinref part="JP2" gate="A" pin="5"/>
<wire x1="-50.8" y1="68.58" x2="-50.8" y2="58.42" width="0.1524" layer="91"/>
<wire x1="-50.8" y1="68.58" x2="-22.86" y2="68.58" width="0.1524" layer="91"/>
<pinref part="JP6" gate="G$1" pin="1"/>
</segment>
</net>
<net name="RST" class="0">
<segment>
<pinref part="S2" gate="G$1" pin="1"/>
<pinref part="JP3" gate="A" pin="3"/>
<label x="-45.72" y="93.98" size="1.778" layer="95" rot="R270"/>
<wire x1="-45.72" y1="86.36" x2="-45.72" y2="96.52" width="0.1524" layer="91"/>
<wire x1="-45.72" y1="96.52" x2="-36.576" y2="96.52" width="0.1524" layer="91"/>
<wire x1="-36.576" y1="96.52" x2="-36.576" y2="93.98" width="0.1524" layer="91"/>
</segment>
</net>
<net name="TRIGGER_STOP" class="0">
<segment>
<label x="-45.72" y="71.12" size="1.778" layer="95"/>
<pinref part="JP2" gate="A" pin="6"/>
<wire x1="-53.34" y1="71.12" x2="-53.34" y2="58.42" width="0.1524" layer="91"/>
<wire x1="-53.34" y1="71.12" x2="-22.86" y2="71.12" width="0.1524" layer="91"/>
<pinref part="JP6" gate="G$1" pin="2"/>
</segment>
</net>
<net name="A0" class="0">
<segment>
<pinref part="R2" gate="G$1" pin="2"/>
<pinref part="R1" gate="G$1" pin="1"/>
<junction x="-101.6" y="96.52"/>
<pinref part="JP3" gate="A" pin="12"/>
<wire x1="-68.58" y1="86.36" x2="-68.58" y2="96.52" width="0.1524" layer="91"/>
<label x="-68.58" y="93.98" size="1.778" layer="95" rot="R270"/>
<wire x1="-101.6" y1="96.52" x2="-68.58" y2="96.52" width="0.1524" layer="91"/>
</segment>
</net>
<net name="A7" class="0">
<segment>
<pinref part="JP3" gate="A" pin="5"/>
<wire x1="-50.8" y1="86.36" x2="-50.8" y2="93.98" width="0.1524" layer="91"/>
<label x="-50.8" y="93.98" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="A6" class="0">
<segment>
<pinref part="JP3" gate="A" pin="6"/>
<wire x1="-53.34" y1="86.36" x2="-53.34" y2="93.98" width="0.1524" layer="91"/>
<label x="-53.34" y="93.98" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="A3" class="0">
<segment>
<pinref part="JP3" gate="A" pin="9"/>
<wire x1="-60.96" y1="86.36" x2="-60.96" y2="93.98" width="0.1524" layer="91"/>
<label x="-60.96" y="93.98" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="A2" class="0">
<segment>
<pinref part="JP3" gate="A" pin="10"/>
<wire x1="-63.5" y1="86.36" x2="-63.5" y2="93.98" width="0.1524" layer="91"/>
<label x="-63.5" y="93.98" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="A1" class="0">
<segment>
<pinref part="JP3" gate="A" pin="11"/>
<wire x1="-66.04" y1="86.36" x2="-66.04" y2="93.98" width="0.1524" layer="91"/>
<label x="-66.04" y="93.98" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="REF" class="0">
<segment>
<pinref part="JP3" gate="A" pin="13"/>
<wire x1="-71.12" y1="86.36" x2="-71.12" y2="93.98" width="0.1524" layer="91"/>
<label x="-71.12" y="93.98" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="3.3V" class="0">
<segment>
<pinref part="C1" gate="G$1" pin="2"/>
<junction x="-86.36" y="93.98"/>
<wire x1="-93.98" y1="93.98" x2="-86.36" y2="93.98" width="0.1524" layer="91"/>
<pinref part="JP5" gate="A" pin="8"/>
<label x="-86.36" y="93.98" size="1.778" layer="95"/>
<pinref part="JP3" gate="A" pin="14"/>
<junction x="-73.66" y="86.36"/>
<wire x1="-73.66" y1="93.98" x2="-86.36" y2="93.98" width="0.1524" layer="91"/>
<wire x1="-73.66" y1="86.36" x2="-73.66" y2="93.98" width="0.1524" layer="91"/>
<wire x1="-93.98" y1="81.28" x2="-93.98" y2="93.98" width="0.1524" layer="91"/>
</segment>
</net>
<net name="TX1" class="0">
<segment>
<pinref part="JP2" gate="A" pin="1"/>
<wire x1="-40.64" y1="58.42" x2="-40.64" y2="66.04" width="0.1524" layer="91"/>
<label x="-40.64" y="66.04" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="RX0" class="0">
<segment>
<pinref part="JP2" gate="A" pin="2"/>
<wire x1="-43.18" y1="58.42" x2="-43.18" y2="66.04" width="0.1524" layer="91"/>
<label x="-43.18" y="66.04" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="RST2" class="0">
<segment>
<pinref part="JP2" gate="A" pin="3"/>
<wire x1="-45.72" y1="58.42" x2="-45.72" y2="66.04" width="0.1524" layer="91"/>
<label x="-45.72" y="66.04" size="1.778" layer="95" rot="R270"/>
</segment>
</net>
<net name="VINA" class="0">
<segment>
<pinref part="JP3" gate="A" pin="1"/>
<wire x1="-40.64" y1="86.36" x2="-40.64" y2="93.98" width="0.1524" layer="91"/>
<label x="-40.64" y="93.98" size="1.778" layer="95" rot="R270"/>
<pinref part="R10" gate="G$1" pin="2"/>
<wire x1="-40.64" y1="93.98" x2="-34.29" y2="93.98" width="0.1524" layer="91"/>
<wire x1="-34.29" y1="93.98" x2="-34.29" y2="83.82" width="0.1524" layer="91"/>
</segment>
</net>
<net name="V_OPT" class="0">
<segment>
<pinref part="R7" gate="G$1" pin="2"/>
<label x="0" y="111.506" size="1.778" layer="95" rot="R180"/>
<pinref part="JP4" gate="G$1" pin="4"/>
<wire x1="-5.08" y1="96.52" x2="0" y2="96.52" width="0.1524" layer="91"/>
<wire x1="-5.08" y1="111.76" x2="0" y2="111.76" width="0.1524" layer="91"/>
<wire x1="0" y1="111.76" x2="0" y2="96.52" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$1" class="0">
<segment>
<pinref part="JP10" gate="G$1" pin="2"/>
<pinref part="JP9" gate="G$1" pin="1"/>
<wire x1="-99.822" y1="134.62" x2="-99.822" y2="126.492" width="0.1524" layer="91"/>
</segment>
</net>
</nets>
</sheet>
</sheets>
</schematic>
</drawing>
</eagle>

license: MIT

license_type: permissive

branch_name: refs/heads/main


text:
@article{cox2017risk,
 author = {Cox, Jolene A and Beanland, Vanessa and Filtness, Ashleigh J},
 journal = {Traffic injury prevention},
 number = {7},
 pages = {703--710},
 publisher = {Taylor & Francis},
 title = {Risk and safety perception on urban and rural roads: Effects of environmental features, driver age and risk sensitivity},
 volume = {18},
 year = {2017}
}

license: Unlicense,MIT

detected_licenses: Unlicense MIT

branch_name: refs/heads/master

gha_license_id: NOASSERTION

extension: bib


text:
require swupdate.inc

SRC_URI = "git://github.com/sbabic/swupdate.git;protocol=git;tag=2016.07 \
     file://defconfig \
     file://swupdate \
     file://swupdate.service \
     "

repository: ZoetropeLabs/meta-swupdate

repo_name: ZoetropeLabs/meta-swupdate

extension: bb


text:
# Set up source groups.

source_group("Configured Files"
  REGULAR_EXPRESSION ".*\\.in$")
source_group("Template Files"
  REGULAR_EXPRESSION ".*\\.txx$")

repository: Kitware/kwiver

repo_name: Kitware/kwiver

extension: cmake


text:
inherit ti-pdk
require cppi-lld.inc

PR = "${INC_PR}.0"

DEPENDS_append = " rm-lld-rtos \
                   qmss-lld-rtos \
"

XDCARGS_k2hk-evm = "k2h k2k"
XDCARGS_k2e-evm = "k2e"
XDCARGS_k2l-evm = "k2l"
XDCARGS_k2g-evm = "k2g"

repository: RedFIR/meta-ti

repo_name: RedFIR/meta-ti


text:
package icbulogistics

// LogisticsProductDto 结构体
type LogisticsProductDto struct {
	// 仓库名称
	WarehouseName string `json:"warehouse_name,omitempty" xml:"warehouse_name,omitempty"`
	// 仓库编码
	WarehouseCode string `json:"warehouse_code,omitempty" xml:"warehouse_code,omitempty"`
	// 产品名称
	ProductName string `json:"product_name,omitempty" xml:"product_name,omitempty"`
	// 产品编码
	ProductCode string `json:"product_code,omitempty" xml:"product_code,omitempty"`
	// 是否上门揽收
	Pickup bool `json:"pickup,omitempty" xml:"pickup,omitempty"`
}

repository: bububa/opentaobao

repo_name: bububa/opentaobao

gha_language: Go

extension: go


text:
# this image includes the base utilities needed to exercise most
# embedded linux hardware

# note, the following must be set to build netperf/sox:
# LICENSE_FLAGS_WHITELIST = "non-commercial"
# see conf/locallocal.conf.sample in Yoe build template

#	e2fsprogs \
#	e2fsprogs-mke2fs \
#	e2fsprogs-fsck \
#	e2fsprogs-e2fsck \
#	e2fsprogs-tune2fs \
#
require yoe-simple-image.bb

IMAGE_FEATURES += "tools-debug tools-profile"

IMAGE_INSTALL += "\
	rsync \
	devmem2 \
	htop \
	evtest \
	netperf \
	gdbserver \
	gdb \
	mtd-utils \
	tslib \
	tslib-calibrate \
	tslib-tests \
	alsa-utils \
	alsa-utils-alsamixer \
	alsa-utils-aconnect \
	alsa-utils-alsactl \
	alsa-utils-alsamixer \
	alsa-utils-amixer \
	alsa-utils-aplay \
	alsa-utils-aseqdump \
	alsa-utils-aseqnet \
	alsa-utils-iecset \
	alsa-utils-scripts \
	alsa-utils-speakertest \
	dosfstools \
	usbutils \
	i2c-tools \
        iw \
	minicom \
	screen \
	cpufrequtils \
	nano \
	sox \
	strace \
	ethtool \
	python3 \
	python3-pyserial \
	"

IMAGE_INSTALL:append:armv7a = " cpuburn-arm "
IMAGE_INSTALL:append:armv7ve = " cpuburn-arm "
IMAGE_INSTALL:append:aarch64 = " cpuburn-arm "

IMAGE_INSTALL:remove:riscv32 = "strace"

export IMAGE_BASENAME = "yoe-debug-image"

QB_MEM = "-m 2048"

repository: YoeDistro/yoe-distro

repo_name: YoeDistro/yoe-distro

gha_license_id: MIT

gha_language: Shell


text:
DESCRIPTION = "/legal"

LICENSE = "commercial"
LIC_FILES_CHKSUM = "file://${THISDIR}/files/license.txt;md5=3ebe3464e841ddbf115af1f7019017c5"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

DEPENDS = "nginx"
RDEPENDS_${PN} = "nginx"

PV = "0.2"

SRC_URI = "http://internal.rdm.local/blobs/${PN}-${PV}.tar.gz;name=legal"
SRC_URI[legal.md5sum] = "ccb221827f2bcd827cca8db6a3d14d70"
SRC_URI[legal.sha256sum] = "f8643b50b34b5cf5ce483bf01012f97dc35b2d0a5b79adbe2d73042ca47edf1e"

do_install() {
    install -o www -g www-data -m 0755 -d ${D}${localstatedir}/www/localhost/legal
    install -o www -g www-data -m 0755 -t ${D}${localstatedir}/www/localhost/legal/ ${WORKDIR}/legal/*
}

repository: zeretztkeG/meta-jens

repo_name: zeretztkeG/meta-jens


text:
<?xml version="1.0" encoding="UTF-8"?>
<drawing version="7">
    <attr value="spartan3e" name="DeviceFamilyName">
        <trait delete="all:0" />
        <trait editname="all:0" />
        <trait edittrait="all:0" />
    </attr>
    <netlist>
        <signal name="XLXN_2" />
        <signal name="XLXN_3" />
        <signal name="S0" />
        <signal name="D0" />
        <signal name="D1" />
        <signal name="Y" />
        <port polarity="Input" name="S0" />
        <port polarity="Input" name="D0" />
        <port polarity="Input" name="D1" />
        <port polarity="Output" name="Y" />
        <blockdef name="and2">
            <timestamp>2000-1-1T10:10:10</timestamp>
            <line x2="64" y1="-64" y2="-64" x1="0" />
            <line x2="64" y1="-128" y2="-128" x1="0" />
            <line x2="192" y1="-96" y2="-96" x1="256" />
            <arc ex="144" ey="-144" sx="144" sy="-48" r="48" cx="144" cy="-96" />
            <line x2="64" y1="-48" y2="-48" x1="144" />
            <line x2="144" y1="-144" y2="-144" x1="64" />
            <line x2="64" y1="-48" y2="-144" x1="64" />
        </blockdef>
        <blockdef name="or2">
            <timestamp>2000-1-1T10:10:10</timestamp>
            <line x2="64" y1="-64" y2="-64" x1="0" />
            <line x2="64" y1="-128" y2="-128" x1="0" />
            <line x2="192" y1="-96" y2="-96" x1="256" />
            <arc ex="192" ey="-96" sx="112" sy="-48" r="88" cx="116" cy="-136" />
            <arc ex="48" ey="-144" sx="48" sy="-48" r="56" cx="16" cy="-96" />
            <line x2="48" y1="-144" y2="-144" x1="112" />
            <arc ex="112" ey="-144" sx="192" sy="-96" r="88" cx="116" cy="-56" />
            <line x2="48" y1="-48" y2="-48" x1="112" />
        </blockdef>
        <blockdef name="and2b1">
            <timestamp>2000-1-1T10:10:10</timestamp>
            <line x2="64" y1="-48" y2="-144" x1="64" />
            <line x2="144" y1="-144" y2="-144" x1="64" />
            <line x2="64" y1="-48" y2="-48" x1="144" />
            <arc ex="144" ey="-144" sx="144" sy="-48" r="48" cx="144" cy="-96" />
            <line x2="192" y1="-96" y2="-96" x1="256" />
            <line x2="64" y1="-128" y2="-128" x1="0" />
            <line x2="40" y1="-64" y2="-64" x1="0" />
            <circle r="12" cx="52" cy="-64" />
        </blockdef>
        <block symbolname="and2" name="XLXI_2">
            <blockpin signalname="S0" name="I0" />
            <blockpin signalname="D1" name="I1" />
            <blockpin signalname="XLXN_3" name="O" />
        </block>
        <block symbolname="or2" name="XLXI_4">
            <blockpin signalname="XLXN_3" name="I0" />
            <blockpin signalname="XLXN_2" name="I1" />
            <blockpin signalname="Y" name="O" />
        </block>
        <block symbolname="and2b1" name="XLXI_5">
            <blockpin signalname="S0" name="I0" />
            <blockpin signalname="D0" name="I1" />
            <blockpin signalname="XLXN_2" name="O" />
        </block>
    </netlist>
    <sheet sheetnum="1" width="3520" height="2720">
        <instance x="1152" y="1024" name="XLXI_2" orien="R0" />
        <instance x="1536" y="896" name="XLXI_4" orien="R0" />
        <branch name="XLXN_2">
            <wire x2="1472" y1="688" y2="688" x1="1408" />
            <wire x2="1472" y1="688" y2="768" x1="1472" />
            <wire x2="1536" y1="768" y2="768" x1="1472" />
        </branch>
        <branch name="XLXN_3">
            <wire x2="1472" y1="928" y2="928" x1="1408" />
            <wire x2="1472" y1="832" y2="928" x1="1472" />
            <wire x2="1536" y1="832" y2="832" x1="1472" />
        </branch>
        <branch name="S0">
            <wire x2="816" y1="960" y2="960" x1="656" />
            <wire x2="1152" y1="960" y2="960" x1="816" />
            <wire x2="896" y1="720" y2="720" x1="816" />
            <wire x2="1152" y1="720" y2="720" x1="896" />
            <wire x2="816" y1="720" y2="960" x1="816" />
        </branch>
        <branch name="D0">
            <wire x2="1152" y1="656" y2="656" x1="1120" />
        </branch>
        <iomarker fontsize="28" x="1120" y="656" name="D0" orien="R180" />
        <branch name="D1">
            <wire x2="1152" y1="896" y2="896" x1="1120" />
        </branch>
        <iomarker fontsize="28" x="1120" y="896" name="D1" orien="R180" />
        <branch name="Y">
            <wire x2="1824" y1="800" y2="800" x1="1792" />
        </branch>
        <iomarker fontsize="28" x="1824" y="800" name="Y" orien="R0" />
        <iomarker fontsize="28" x="656" y="960" name="S0" orien="R180" />
        <instance x="1152" y="784" name="XLXI_5" orien="R0" />
    </sheet>
</drawing>

extension: sch


text:
package tc

import (
	"errors"
	"io"
	"testing"

	"github.com/google/go-cmp/cmp"
)

func TestCmpMatch(t *testing.T) {
	// cmp(u16 at 3 layer 2 mask 0xff00 gt 20)
	in := CmpMatch{
		Val:   20,
		Mask:  0xff00,
		Off:   3,
		Align: CmpMatchU16,
		Layer: EmatchLayerTransport,
		Opnd:  EmatchOpndGt,
	}

	data, err := marshalCmpMatch(&in)
	if err != nil {
		t.Fatal(err)
	}
	out := CmpMatch{}
	if err := unmarshalCmpMatch(data, &out); err != nil {
		t.Fatal(err)
	}
	if diff := cmp.Diff(in, out); diff != "" {
		t.Fatalf("CmpMatch missmatch (-want +got):\n%s", diff)
	}
	t.Run("nil-marshalCmpMatch", func(t *testing.T) {
		_, err := marshalCmpMatch(nil)
		if !errors.Is(err, ErrNoArg) {
			t.Fatalf("unexpected error: %v", err)
		}
	})
	t.Run("nil-unmarshalCmpMatch", func(t *testing.T) {
		if err := unmarshalCmpMatch([]byte{}, nil); !errors.Is(err, io.EOF) {
			t.Fatalf("unexpected error: %v", err)
		}
	})
}

repository: florianl/go-tc

repo_name: florianl/go-tc


text:
using AS.Domain.Interfaces;
using AS.Services.Interfaces;
using System.Threading;

namespace AS.Jobs
{
    /// <summary>
    /// Async Job  that sends pending e-mails via SMTP server(whatever is set)
    /// </summary>
    public class MailSendingJob : JobBase
    {
        private static readonly object _lockObj = new object();

        private readonly IMailService _mailService;

        public MailSendingJob(IMailService mailService, ILogger logger)
            : base(logger)
        {
            this._mailService = mailService;
        }

        protected override void OnExecute()
        {
            if (Monitor.TryEnter(_lockObj))
            {
                try
                {
                    this._mailService.SendPendingEMails();
                }
                finally
                {
                    Monitor.Exit(_lockObj);
                }
            }
        }
    }
}

gha_language: JavaScript

extension: cs


text:
SUMMARY = "A PKCS#11 interface for TPM2 hardware"
DESCRIPTION = "PKCS #11 is a Public-Key Cryptography Standard that defines a standard method to access cryptographic services from tokens/ devices such as hardware security modules (HSM), smart cards, etc. In this project we intend to use a TPM2 device as the cryptographic token."
SECTION = "security/tpm"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=0fc19f620a102768d6dbd1e7166e78ab"

DEPENDS = "autoconf-archive pkgconfig sqlite3 openssl libtss2-dev tpm2-tools libyaml p11-kit python3-setuptools-native"

SRC_URI = "https://github.com/tpm2-software/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.gz"

SRC_URI[sha256sum] = "35bf06c30cfa76fc0eba2c5f503cf7dd0d34a66afb2d292fee896b90362f633b"

UPSTREAM_CHECK_URI = "https://github.com/tpm2-software/${BPN}/releases"

inherit autotools-brokensep pkgconfig python3native

EXTRA_OECONF += "--disable-ptool-checks"

do_compile:append() {
    cd ${S}/tools
    python3 setup.py build
}

do_install:append() {
    cd ${S}/tools
    export PYTHONPATH="${D}${PYTHON_SITEPACKAGES_DIR}"
    ${PYTHON_PN} setup.py install --root="${D}" --prefix="${prefix}" --install-lib="${PYTHON_SITEPACKAGES_DIR}" --optimize=1 --skip-build

    sed -i -e "s:${PYTHON}:${USRBINPATH}/env ${PYTHON_PN}:g" "${D}${bindir}"/tpm2_ptool
}

PACKAGES =+ "${PN}-tools"

FILES:${PN}-tools = "\
    ${bindir}/tpm2_ptool \
    ${libdir}/${PYTHON_DIR}/* \
    "

FILES:${PN} += "\
    ${libdir}/pkcs11/* \
    ${datadir}/p11-kit/* \
    "

INSANE_SKIP:${PN}   += "dev-so"

RDEPENDS:${PN} = "p11-kit tpm2-tools "
RDEPENDS:${PN}-tools = "${PYTHON_PN}-pyyaml ${PYTHON_PN}-cryptography ${PYTHON_PN}-pyasn1-modules"

repository: foundriesio/meta-lmp

repo_name: foundriesio/meta-lmp

gha_language: BitBake


text:
require arago-core-tisdk-image.inc

DEPLOY_SPL_NAME_omapl138 = ""
DEPLOY_SPL_NAME_k2hk = ""
DEPLOY_SPL_NAME_k2l-evm = ""
DEPLOY_SPL_NAME_k2e = ""
# Only unset it for HS device, as k2g GP does provide MLO/SPL
DEPLOY_SPL_NAME_k2g-hs-evm = ""

ARAGO_TISDK_IMAGE ?= "arago-core-tisdk-image"
export IMAGE_BASENAME = "${ARAGO_TISDK_IMAGE}"

repository: Esipov/meta-arago

repo_name: Esipov/meta-arago


text:
# Keep this separately from the rest of the .bb file in case that .bb file is
# overridden from another layer.
require u-boot-fw-utils-mender.inc

#-------------------------------------------------------------------------------
# Everything below here is dedicated to providing an automatic OOTB
# u-boot-fw-utils recipe, for those configurations that lack it. It does this by
# reusing the sources from the main U-Boot recipe itself.

LICENSE = "GPL-2.0"
# Specifying a dummy file here is slightly evil, but the problem is that since
# this is a special recipe which uses source code coming from any odd U-Boot
# version imaginable, it is not possible to use a stable checksum pointing to a
# file from within that source. It is pretty unlikely that U-Boot will change
# license, so use this for now.
LIC_FILES_CHKSUM = "file://dummy-license.txt;md5=f02e326f800ee26f04df7961adbf7c0a"

PROVIDES = "u-boot-fw-utils"
RPROVIDES_${PN} = "u-boot-fw-utils"

INSANE_SKIP_${PN} = "already-stripped"
EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" V=1'
DEPENDS += "bison-native"

S = "${WORKDIR}/src-tar"

def mender_preferred_uboot(d):
    pref_uboot = d.getVar('PREFERRED_PROVIDER_u-boot')
    if pref_uboot in [None, ""]:
        pref_bootloader = d.getVar('PREFERRED_PROVIDER_virtual/bootloader')
        if pref_bootloader and pref_bootloader.startswith("u-boot"):
            return pref_bootloader
        else:
            return "u-boot"
    else:
        return pref_uboot
MENDER_PREFERRED_UBOOT = "${@mender_preferred_uboot(d)}"

do_patch() {
    rm -rf ${S}
    mkdir -p ${WORKDIR}
    cd ${WORKDIR}
    tar xzf ${TMPDIR}/mender-u-boot-src.tar.gz

    # See LIC_FILES_CHKSUM.
    echo dummy > ${S}/dummy-license.txt
}
do_patch[depends] += "${MENDER_PREFERRED_UBOOT}:do_mender_tar_src"

do_compile () {
    oe_runmake ${UBOOT_MACHINE}

    # Detect what the build target to the environment tools is. It changed from
    # "env" to "envtools" in v2017.09.
    grep -q '^tools-all: *env\b' Makefile && ENV_TARGET=env
    grep -q '^tools-all: *envtools\b' Makefile && ENV_TARGET=envtools
    if [ -z "$ENV_TARGET" ]; then
        echo "Could not determine environment tools target."
        exit 1
    fi

    oe_runmake include/generated/timestamp_autogenerated.h include/generated/version_autogenerated.h || true
    oe_runmake $ENV_TARGET
}

do_install () {
    install -d ${D}${base_sbindir}
    install -d ${D}${sysconfdir}
    install -m 755 ${B}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
    install -m 755 ${B}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
    install -m 0644 ${B}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
}

PACKAGE_ARCH = "${MACHINE_ARCH}"

repository: drewmoseley/meta-mender

repo_name: drewmoseley/meta-mender

gha_language: Python


text:
package dsunit

import (
	"fmt"
	"github.com/viant/toolbox"
	"log"
	"net/http"
)

var version = "/v2/"
var initURI = version + "init"
var registerURI = version + "register"
var recreateURI = version + "recreate"
var mappingURI = version + "mapping"
var scriptURI = version + "script"
var sqlURI = version + "sql"
var schemaURI = version + "schema"
var prepareURI = version + "prepare"
var expectURI = version + "expect"
var queryURI = version + "query"
var freezeURI = version + "freeze"
var dumpURI = version + "dump"
var sequenceURI = version + "sequence"
var compareURI = version + "compare"

var errorHandler = func(router *toolbox.ServiceRouter, responseWriter http.ResponseWriter, httpRequest *http.Request, message string) {
	err := router.WriteResponse(toolbox.NewJSONEncoderFactory(), &BaseResponse{Status: "error", Message: message}, httpRequest, responseWriter)
	if err != nil {
		log.Fatalf("failed to write response :%v", err)
	}
}

//StartServer start dsunit server
func StartServer(port string) {
	var service = New()
	serviceRouter := toolbox.NewServiceRouter(
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        registerURI,
			Handler:    service.Register,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        recreateURI,
			Handler:    service.Recreate,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        mappingURI,
			Handler:    service.AddTableMapping,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        initURI,
			Handler:    service.Init,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        scriptURI,
			Handler:    service.RunScript,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        sqlURI,
			Handler:    service.RunSQL,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        prepareURI,
			Handler:    service.Prepare,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        expectURI,
			Handler:    service.Expect,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        queryURI,
			Handler:    service.Query,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        sequenceURI,
			Handler:    service.Sequence,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        freezeURI,
			Handler:    service.Freeze,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        dumpURI,
			Handler:    service.Dump,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        compareURI,
			Handler:    service.Compare,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        schemaURI,
			Handler:    service.CheckSchema,
			Parameters: []string{"request"},
		},
		toolbox.ServiceRouting{
			HTTPMethod: "POST",
			URI:        compareURI,
			Handler:    service.Ping,
			Parameters: []string{"ping"},
		},
	)

	http.HandleFunc("/", func(responseWriter http.ResponseWriter, httpRequest *http.Request) {
		defer func() {
			if err := recover(); err != nil {
				errorHandler(serviceRouter, responseWriter, httpRequest, fmt.Sprintf("%v", err))
			}
		}()
		err := serviceRouter.Route(responseWriter, httpRequest)
		if err != nil {
			errorHandler(serviceRouter, responseWriter, httpRequest, fmt.Sprintf("%v", err))
		}
	})

	fmt.Printf("Started dsunit server on port %v\n", port)
	log.Fatal(http.ListenAndServe(":"+port, nil))
}

repository: viant/dsunit

repo_name: viant/dsunit


text:
#  This is the source code of SpecNet project
#  It is licensed under MIT License.
#  Copyright (c) Dmitriy Bondarenko
#  feel free to contact me: specnet.messenger@gmail.com

# Configuration of the assembly
#   according to the selected components:

# System configuration
set(OS_INCLUDE
  ${SPEC_SRC_COMMON}/file
     )

set(OS_SRC
  ${SPEC_SRC_COMMON}/file/fileadapter.cpp
   )

# OS configuration
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
  message(STATUS "Linux was chosen ")
  set(OS_INCLUDE
    ${OS_INCLUDE}
    ${SPEC_SRC_COMMON}/system/linux
       )

  set(OS_SRC
    ${OS_SRC}
    ${SPEC_SRC_COMMON}/system/linux/linuxsystem.cpp
     )

  set(OS_LIBS
             dl
            pthread
            stdc++fs
         )

elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
   message(STATUS "Windows was chosen ")

set(OS_INCLUDE
  ${OS_INCLUDE}
  ${SPEC_SRC_COMMON}/system/windows
     )

set(OS_SRC
  ${OS_SRC}
  ${SPEC_SRC_COMMON}/system/windows/windowssystem.cpp
   )

   set(OS_DEFINITIONS
    "WIN32_LEAN_AND_MEAN"
    FD_SETSIZE=1024
  )
endif()
message("OS_SRC : ${OS_SRC}")


text:
import { AdjudicationRoutes } from '@adjudication/adjudication.routes';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ConfigService } from '@config/config.service';
import { RouteUtils } from '@lib/utils/route-utils.class';
import { Subscription } from 'rxjs';

@Component({
  selector: 'app-authorized-users-page',
  templateUrl: './authorized-users-page.component.html',
  styleUrls: ['./authorized-users-page.component.scss']
})
export class AuthorizedUsersPageComponent implements OnInit {
  public busy: Subscription;
  public healthAuthName: string;

  private routeUtils: RouteUtils;

  constructor(
    private route: ActivatedRoute,
    private router: Router,
    private configService: ConfigService,
  ) {
    this.healthAuthName = this.configService.healthAuthorities.find(ha => ha.code === +this.route.snapshot.params.haid)?.name;
    this.routeUtils = new RouteUtils(route, router, AdjudicationRoutes.routePath(AdjudicationRoutes.SITE_REGISTRATIONS));
  }

  public onRoute(routePath: string | (string | number)[]) {
    this.routeUtils.routeWithin(routePath);
  }

  public ngOnInit(): void { }
}

repository: bcgov/moh-prime

repo_name: bcgov/moh-prime

branch_name: refs/heads/develop

gha_language: C#

extension: ts


text:
SUMMARY = "NCBI libraries for graphic biology applications (debugging symbols)"
DESCRIPTION = "The NCBI Software Development Toolkit was developed for the production and \
 distribution of GenBank, Entrez, BLAST, and related services by NCBI.  It \
 allows you to read and write NCBI ASN.1 files, builds Blast or Entrez, etc."
HOMEPAGE = "http://www.ncbi.nlm.nih.gov/IEB/ToolBox/"

inherit debian-package
PV = "6.1.20120620"

LICENSE = "PD"
LIC_FILES_CHKSUM = "file://tools/actutils.c;beginline=3;endline=25;md5=f6c3e650cfb094790261046ae1f1eaa0"

# Add links the library files for compile
SRC_URI += "file://Fix-missing-library-to-compile_debian.patch"

DEBIAN_PATCH_TYPE = "nopatch"

inherit autotools update-alternatives
B = "${S}/build"

DEPENDS += "libxmu motif libglu libpcre libpng csh-native"
export NCBI_VERSION_MAJOR = "6"
export NCBI_VERSION_MINOR= "1.20120620"
do_compile() {
	# Follow debian/rules
	export LD_LIBRARY_PATH=${S}/shlib:$LD_LIBRARY_PATH
	export NCBI_LBSM_SRC=ncbi_lbsmd_stub.c
	export NCBI_LBSM_OBJ=ncbi_lbsmd_stub.o

	LDFLAGS1="${CFLAGS} ${LDFLAGS}"
	VIBLIBS="-lXm -lXmu -lXt -lX11"
	OTHERLIBS="-lm"
	VIBFLAG="-DWIN_MOTIF"
	USESHLIB="NCBI_LINKINGLIBDIR="../shlib""
	MAKESHLIB="${USESHLIB} NCBI_SHLIBS=shlib"
	CFLAGS_PIC="${CFLAGS} -fPIC"
	PNG_INCLUDE="-D_PNG"
	OGL_LIBVARS="LIB400=libvibrantOGL.a LIB3000=libncbicn3dOGL.a"
	NETENTREZVERSION="2.02c2ASN1SPEC6"
	OGLLIBS="-lGLU -lGL"
	PNG_LIBS="-lpng"
	OTHERS="libncbimla.a libnetblast.a libncbitxc2.a libncbiid1.a shlib"
	THREAD_OBJ="ncbithr.o"
	MT_OTHERLIBS="-lpthread"
	OGL_TARGETS="Cn3D"
	MTAPPS="blast blastall blastall_old blastpgp seedtop megablast \
	        rpsblast blastclust"
	VIB="Psequin sbtedit udv ddv blastcl3 taxblast idfetch bl2seq asn2gb tbl2asn \
	gene2xml entrez2 gbseqget asn2all asn2asn asn2fsa asn2xml asndisc \
	asnmacro asnval cleanasn insdseqget nps2gps spidey trna2sap trna2tbl \
	${OGL_TARGETS}"

	ln -sf ../make/*.unx .
	sed -i -e "s|!/bin/csh|!${STAGING_DIR_NATIVE}${base_bindir_native}/csh|" ${S}/make/ln-if-absent
	local shebang_length=$(head -n 1 ${S}/make/ln-if-absent | wc -m)
	if [ ${shebang_length} -gt 127 ]; then
		sed -i -e "s|!${STAGING_DIR_NATIVE}${base_bindir_native}/csh -f|!/usr/bin/env csh|" ${S}/make/ln-if-absent
	fi
	ln -sf ../make/ln-if-absent build
	mv makeall.unx makefile
	chmod +x ${S}/debian/makemenu

	oe_runmake -C ${S}/build all \
		CC="${CC}" LDFLAGS1="${LDFLAGS1}" LCL=lnx \
		AR="${AR}" RAN="${RANLIB}" OTHERLIBS="${OTHERLIBS}" \
		VIBLIBS="${VIBLIBS}" VIBFLAG="${VIBFLAG}" \
		${USESHLIB} \
		CFLAGS1="-c ${CFLAGS_PIC} ${PNG_INCLUDE}" \
		LIB4=libvibrant.a LIB20=libncbidesk.a LIB28=libvibgif.a \
		LIB30=libncbicn3d.a LIB45=libddvlib.a ${OGL_LIBVARS}

	oe_runmake -C ${S}/build -f makenet.unx \
		CC="${CC}" LDFLAGS1="${LDFLAGS1}" LCL=lnx \
		AR="${AR}" RAN="${RANLIB}" OTHERLIBS="${OTHERLIBS}" \
		VIBLIBS="${VIBLIBS}" VIBFLAG="${VIBFLAG}" \
		${USESHLIB} \
		CFLAGS1="-c ${CFLAGS_PIC}" \
		LDFLAGS="${LDFLAGS}" \
		NETENTREZVERSION="${NETENTREZVERSION}" \
		BLIB31=libvibnet.a OGLLIBS="${OGLLIBS} ${PNG_LIBS}" \
		all ${OTHERS}

	# Clear out the PIC objects
	oe_runmake -C ${S}/build clean

	oe_runmake -C ${S}/build all \
		CC="${CC}" LDFLAGS1="${LDFLAGS1}" LCL=lnx \
		AR="${AR}" RAN="${RANLIB}" OTHERLIBS="${OTHERLIBS}" \
		VIBLIBS="${VIBLIBS}" VIBFLAG="${VIBFLAG}" \
		${USESHLIB} \
		CFLAGS1="-c ${CFLAGS} ${PNG_INCLUDE}" \
		LIB4=libvibrant.a LIB20=libncbidesk.a LIB28=libvibgif.a \
		LIB30=libncbicn3d.a LIB45=libddvlib.a ${OGL_LIBVARS}

	oe_runmake -C ${S}/build -f makedemo.unx \
		CC="${CC}" LDFLAGS1="${LDFLAGS1}" LCL=lnx \
		AR="${AR}" RAN="${RANLIB}" OTHERLIBS="${OTHERLIBS} -lnetcli" \
		VIBLIBS="${VIBLIBS}" VIBFLAG="${VIBFLAG}" \
		${USESHLIB} \
		CFLAGS1="-c ${CFLAGS}" \
		VIBLIBS= VIBFLAG= LIB50=-lpcre
		cd ${S}/build & rm -f ${MTAPPS}

	oe_runmake -C ${S}/build -f makedemo.unx \
		CC="${CC}" LDFLAGS1="${LDFLAGS1}" LCL=lnx \
		AR="${AR}" RAN="${RANLIB}" OTHERLIBS="${OTHERLIBS}" \
		VIBLIBS="${VIBLIBS}" VIBFLAG="${VIBFLAG}" \
		${USESHLIB} \
		CFLAGS1="-c ${CFLAGS}" \
		VIBLIBS= VIBFLAG= THREAD_OBJ="${THREAD_OBJ}" \
		THREAD_OTHERLIBS="${MT_OTHERLIBS}" ${MTAPPS}

	oe_runmake -C ${S}/build -f makenet.unx \
		CC="${CC}" LDFLAGS1="${LDFLAGS1}" LCL=lnx \
		AR="${AR}" RAN="${RANLIB}" OTHERLIBS="${OTHERLIBS}" \
		VIBLIBS="${VIBLIBS}" VIBFLAG="${VIBFLAG}" \
		${USESHLIB} \
		CFLAGS1="-c ${CFLAGS}" \
		THREAD_OBJ="${THREAD_OBJ}" \
		THREAD_OTHERLIBS="${MT_OTHERLIBS}" \
		NETENTREZVERSION="${NETENTREZVERSION}" BLIB31=libvibnet.a \
		OGLLIBS= VIBLIBS= VIB="${VIB}"
}

# Base on debian/rules
do_install() {
	install -d ${D}${libdir}
	install -m 0644 ${S}/lib/* \
		${S}/shlib/*.so.${NCBI_VERSION_MAJOR}.${NCBI_VERSION_MINOR} \
		${D}${libdir}
	for x in ncbiacc ncbiCacc netentr; do
		rm -f ${D}${libdir}/lib${x}.so.${NCBI_VERSION_MAJOR}.${NCBI_VERSION_MINOR}
		ln -s libncbiNacc.so.${NCBI_VERSION_MAJOR} \
			${D}${libdir}/lib${x}.so.${NCBI_VERSION_MAJOR}
		ln -s libncbiNacc.so ${D}${libdir}/lib${x}.so
	done

	for x in ncbicn3d vibrant; do
		rm -f ${D}${libdir}/lib${x}.so.${NCBI_VERSION_MAJOR}.${NCBI_VERSION_MINOR}
		ln -s lib${x}OGL.so.${NCBI_VERSION_MAJOR} \
			${D}${libdir}/lib${x}.so.${NCBI_VERSION_MAJOR}
		ln -s lib${x}OGL.so ${D}${libdir}/lib${x}.so
	done

	rm -f ${D}${libdir}/libregexp.*

	cd ${D}${libdir}
	for f in *.so.${NCBI_VERSION_MAJOR}.${NCBI_VERSION_MINOR}; do
		base=`basename $f .so.${NCBI_VERSION_MAJOR}.${NCBI_VERSION_MINOR}`
		ln -s $f ${base}.so.${NCBI_VERSION_MAJOR}
		ln -s $f ${base}.so
	done

	install -d ${D}${includedir}/ncbi
	cp -LRp ${S}/include/* ${D}${includedir}/ncbi
	cd ${D}${includedir}/ncbi && \
		rm -f FSpCompat.h FullPath.h More*.h Optimization*.h pcre*.h
	find ${D}${includedir} -type f | xargs chmod 644

	install -d ${D}${bindir}
	install `find ${S}/build -type f -perm /111 -print` \
		${D}${bindir}
	rm -f ${D}${bindir}/*test* \
	      ${D}${bindir}/*demo* \
	      ${D}${bindir}/dosimple \
	      ${D}${bindir}/ncbisort \
	      ${D}${bindir}/cdscan \
	      ${D}${bindir}/entrcmd \
	      ${D}${bindir}/blast.REAL
	mv ${D}${bindir}/Cn3D ${D}${bindir}/Cn3D-3.0
	mv ${D}${bindir}/blast ${D}${bindir}/blast2

	install -d ${D}${sysconfdir}/ncbi
	install -m 0644 ${S}/debian/.*rc ${D}${sysconfdir}/ncbi
	install ${S}/debian/vibrate ${D}${bindir}

	install -d ${D}${datadir}/ncbi/data
	install -m 0644 ${S}/data/* ${D}${datadir}/ncbi/data

	# Follow debian/ncbi-tools-x11.links
	ln -s entrez2 ${D}${bindir}/entrez
	ln -s Psequin ${D}${bindir}/sequin

	install -d ${D}${libdir}/mime/packages
	install -m 0644 ${S}/debian/ncbi-tools-x11.mime \
		${D}${libdir}/mime/packages/ncbi-tools-x11

}

PACKAGES =+ "blast libvibrant6b libncbi ncbi-rrna-data ncbi-data ncbi-tools-x11"

FILES_blast = "${bindir}/*blast* \
               ${bindir}/bl2seq \
               ${bindir}/copymat \
               ${bindir}/fastacmd \
               ${bindir}/formatdb \
               ${bindir}/formatrpsdb \
               ${bindir}/impala \
               ${bindir}/makemat \
               ${bindir}/seedtop"

FILES_libncbi = "${libdir}/*${SOLIBS}"

FILES_libvibrant6b = "${libdir}/libddvlib${SOLIBS} \
                      ${libdir}/libncbicn3d${SOLIBS} \
                      ${libdir}/libncbicn3dOGL${SOLIBS} \
                      ${libdir}/libncbidesk${SOLIBS} \
                      ${libdir}/libvibnet${SOLIBS} \
                      ${libdir}/libvibrant${SOLIBS} \
                      ${libdir}/libvibrantOGL${SOLIBS}"
FILES_ncbi-data = "${sysconfdir} \
                   ${bindir}/vibrate \
                   ${datadir}/ncbi/* \
                   ${datadir}/pixmaps/*"

FILES_ncbi-rrna-data = "${datadir}/ncbi/data/Combined16SrRNA_* \
                        ${datadir}/ncbi/data/LSURef_* \
                        ${datadir}/ncbi/data/SSURef_* \
                        ${datadir}/ncbi/data/rRNA_blast.nal"
FILES_ncbi-tools-x11 = "${bindir}/Cn3D-3.0 \
                        ${bindir}/Psequin \
                        ${bindir}/ddv \
                        ${bindir}/entrez* \
                        ${bindir}/sbtedit \
                        ${bindir}/udv \
                        ${bindir}/sequin \
                        ${libdir}/mime \
                        ${datadir}/applications"

PKG_${PN} = "ncbi-tools-bin"
PKG_blast = "blast2"
PKG_libncbi = "libncbi6"
RPROVIDES_${PN} += "ncbi-tools-bin"
RPROVIDES_blast += "blast2"
RPROVIDES_libncbi += "libncbi6"
RPROVIDES_${PN}-dev += "libncbi6-dev libvibrant6-dev"
RDEPENDS_libncbi += "ncbi-data"
RDEPENDS_ncbi-rrna-data += "ncbi-data"
RRECOMMENDS_ncbi-rrna-data += "blast2"
RDEPENDS_${PN} += "libncbi6"
RSUGGESTS_${PN} += "blast2 libvibrant6b ncbi-tools-x11"
RDEPENDS_ncbi-tools-x11 += "libncbi6 libvibrant6b"
RSUGGESTS_ncbi-tools-x11 += "blast2 ncbi-tools-bin"
RDEPENDS_blast += "libncbi6"
RDEPENDS_libvibrant6b += "libncbi6"
RDEPENDS_${PN}-dev += "libglu-dev libmotif-dev libvibrant6b libxmu-dev"

# Follow debian/ncbi-tools-x11.postinst
ALTERNATIVE_ncbi-tools-x11 = "Cn3D"
ALTERNATIVE_PRIORITY = "30"
ALTERNATIVE_LINK_NAME[Cn3D] = "${bindir}/Cn3D"
ALTERNATIVE_TARGET[Cn3D] = "${bindir}/Cn3D-3.0"

# Avoid a parallel build problem
PARALLEL_MAKE = ""

repository: manut/meta-combo

repo_name: manut/meta-combo

branch_name: refs/heads/morty


text:
/*
Copyright 2018 The Knative 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 bus

import (
	"fmt"
	"reflect"
	"time"

	"github.com/golang/glog"
	"github.com/knative/eventing/pkg/controller"
	appsv1 "k8s.io/api/apps/v1"
	corev1 "k8s.io/api/core/v1"
	rbacv1beta1 "k8s.io/api/rbac/v1beta1"
	"k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/apimachinery/pkg/util/intstr"
	"k8s.io/apimachinery/pkg/util/runtime"
	"k8s.io/apimachinery/pkg/util/wait"
	kubeinformers "k8s.io/client-go/informers"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/kubernetes/scheme"
	typedcorev1 "k8s.io/client-go/kubernetes/typed/core/v1"
	appslisters "k8s.io/client-go/listers/apps/v1"
	corelisters "k8s.io/client-go/listers/core/v1"
	rbaclisters "k8s.io/client-go/listers/rbac/v1beta1"
	"k8s.io/client-go/rest"
	"k8s.io/client-go/tools/cache"
	"k8s.io/client-go/tools/record"
	"k8s.io/client-go/util/workqueue"

	clientset "github.com/knative/eventing/pkg/client/clientset/versioned"
	channelscheme "github.com/knative/eventing/pkg/client/clientset/versioned/scheme"
	informers "github.com/knative/eventing/pkg/client/informers/externalversions"
	listers "github.com/knative/eventing/pkg/client/listers/channels/v1alpha1"
	sharedclientset "github.com/knative/pkg/client/clientset/versioned"
	sharedinformers "github.com/knative/pkg/client/informers/externalversions"

	channelsv1alpha1 "github.com/knative/eventing/pkg/apis/channels/v1alpha1"
	"github.com/knative/eventing/pkg/controller/util"
)

const controllerAgentName = "bus-controller"

const (
	// SuccessSynced is used as part of the Event 'reason' when a Bus is synced
	SuccessSynced = "Synced"
	// ErrResourceExists is used as part of the Event 'reason' when a Bus fails
	// to sync due to a Service of the same name already existing.
	ErrResourceExists = "ErrResourceExists"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a Service already existing
	MessageResourceExists = "Resource %q already exists and is not managed by Bus"
	// MessageResourceSynced is the message used for an Event fired when a Bus
	// is synced successfully
	MessageResourceSynced = "Bus synced successfully"
)

const (
	// ServiceSynced is used as part of the condition reason when the bus (k8s) service is successfully created.
	ServiceSynced = "ServiceSynced"
	// ServiceError is used as part of the condition reason when the bus (k8s) service creation failed.
	ServiceError = "ServiceError"
	// DeploymentSynced is used as part of the condition reason when a bus deployment is successfully created.
	DeploymentSynced = "DeploymentSynced"
	// DeploymentError is used as part of the condition reason when a bus deployment creation failed.
	DeploymentError = "DeploymentError"
)

// Controller is the controller implementation for Bus resources
type Controller struct {
	// kubeclientset is a standard kubernetes clientset
	kubeclientset kubernetes.Interface
	// busclientset is a clientset for our own API group
	busclientset clientset.Interface

	deploymentsLister         appslisters.DeploymentLister
	deploymentsSynced         cache.InformerSynced
	servicesLister            corelisters.ServiceLister
	servicesSynced            cache.InformerSynced
	serviceAccountsLister     corelisters.ServiceAccountLister
	serviceAccountsSynced     cache.InformerSynced
	clusterRoleBindingsLister rbaclisters.ClusterRoleBindingLister
	clusterRoleBindingsSynced cache.InformerSynced
	busesLister               listers.BusLister
	busesSynced               cache.InformerSynced

	// workqueue is a rate limited work queue. This is used to queue work to be
	// processed instead of performing it as soon as a change happens. This
	// means we can ensure we only process a fixed amount of resources at a
	// time, and makes it easy to ensure we are never processing the same item
	// simultaneously in two different workers.
	workqueue workqueue.RateLimitingInterface
	// recorder is an event recorder for recording Event resources to the
	// Kubernetes API.
	recorder record.EventRecorder
}

// NewController returns a new bus controller
func NewController(
	kubeclientset kubernetes.Interface,
	busclientset clientset.Interface,
	sharedclientset sharedclientset.Interface,
	restConfig *rest.Config,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	busInformerFactory informers.SharedInformerFactory,
	istioInformerFactory sharedinformers.SharedInformerFactory) controller.Interface {

	// obtain references to shared index informers for the Bus, Deployment and Service
	// types.
	busInformer := busInformerFactory.Channels().V1alpha1().Buses()
	deploymentInformer := kubeInformerFactory.Apps().V1().Deployments()
	serviceInformer := kubeInformerFactory.Core().V1().Services()
	serviceAccountInformer := kubeInformerFactory.Core().V1().ServiceAccounts()
	clusterRoleBindingInformer := kubeInformerFactory.Rbac().V1beta1().ClusterRoleBindings()

	// Create event broadcaster
	// Add bus-controller types to the default Kubernetes Scheme so Events can be
	// logged for bus-controller types.
	channelscheme.AddToScheme(scheme.Scheme)
	glog.V(4).Info("Creating event broadcaster")
	eventBroadcaster := record.NewBroadcaster()
	eventBroadcaster.StartLogging(glog.Infof)
	eventBroadcaster.StartRecordingToSink(&typedcorev1.EventSinkImpl{Interface: kubeclientset.CoreV1().Events("")})
	recorder := eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: controllerAgentName})

	controller := &Controller{
		kubeclientset:             kubeclientset,
		busclientset:              busclientset,
		deploymentsLister:         deploymentInformer.Lister(),
		deploymentsSynced:         deploymentInformer.Informer().HasSynced,
		servicesLister:            serviceInformer.Lister(),
		servicesSynced:            serviceInformer.Informer().HasSynced,
		serviceAccountsLister:     serviceAccountInformer.Lister(),
		serviceAccountsSynced:     serviceAccountInformer.Informer().HasSynced,
		clusterRoleBindingsLister: clusterRoleBindingInformer.Lister(),
		clusterRoleBindingsSynced: clusterRoleBindingInformer.Informer().HasSynced,
		busesLister:               busInformer.Lister(),
		busesSynced:               busInformer.Informer().HasSynced,
		workqueue:                 workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "Buses"),
		recorder:                  recorder,
	}

	glog.Info("Setting up event handlers")
	// Set up an event handler for when Bus resources change
	busInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
		AddFunc: controller.enqueueBus,
		UpdateFunc: func(old, new interface{}) {
			controller.enqueueBus(new)
		},
	})
	// Set up an event handler for when Service resources change. This
	// handler will lookup the owner of the given Service, and if it is
	// owned by a Bus resource will enqueue that Bus resource for
	// processing. This way, we don't need to implement custom logic for
	// handling Service resources. More info on this pattern:
	// https://github.com/kubernetes/community/blob/8cafef897a22026d42f5e5bb3f104febe7e29830/contributors/devel/controllers.md
	serviceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
		AddFunc: controller.handleObject,
		UpdateFunc: func(old, new interface{}) {
			newService := new.(*corev1.Service)
			oldService := old.(*corev1.Service)
			if newService.ResourceVersion == oldService.ResourceVersion {
				// Periodic resync will send update events for all known Services.
				// Two different versions of the same Service will always have different RVs.
				return
			}
			controller.handleObject(new)
		},
		DeleteFunc: controller.handleObject,
	})

	return controller
}

// Run will set up the event handlers for types we are interested in, as well
// as syncing informer caches and starting workers. It will block until stopCh
// is closed, at which point it will shutdown the workqueue and wait for
// workers to finish processing their current work items.
func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error {
	defer runtime.HandleCrash()
	defer c.workqueue.ShutDown()

	// Start the informer factories to begin populating the informer caches
	glog.Info("Starting Bus controller")

	// Wait for the caches to be synced before starting workers
	glog.Info("Waiting for informer caches to sync")
	if ok := cache.WaitForCacheSync(stopCh, c.deploymentsSynced, c.servicesSynced, c.busesSynced); !ok {
		return fmt.Errorf("failed to wait for caches to sync")
	}

	glog.Info("Starting workers")
	// Launch two workers to process Bus resources
	for i := 0; i < threadiness; i++ {
		go wait.Until(c.runWorker, time.Second, stopCh)
	}

	glog.Info("Started workers")
	<-stopCh
	glog.Info("Shutting down workers")

	return nil
}

// runWorker is a long-running function that will continually call the
// processNextWorkItem function in order to read and process a message on the
// workqueue.
func (c *Controller) runWorker() {
	for c.processNextWorkItem() {
	}
}

// processNextWorkItem will read a single work item off the workqueue and
// attempt to process it, by calling the syncHandler.
func (c *Controller) processNextWorkItem() bool {
	obj, shutdown := c.workqueue.Get()

	if shutdown {
		return false
	}

	// We wrap this block in a func so we can defer c.workqueue.Done.
	err := func(obj interface{}) error {
		// We call Done here so the workqueue knows we have finished
		// processing this item. We also must remember to call Forget if we
		// do not want this work item being re-queued. For example, we do
		// not call Forget if a transient error occurs, instead the item is
		// put back on the workqueue and attempted again after a back-off
		// period.
		defer c.workqueue.Done(obj)
		var key string
		var ok bool
		// We expect strings to come off the workqueue. These are of the
		// form namespace/name. We do this as the delayed nature of the
		// workqueue means the items in the informer cache may actually be
		// more up to date that when the item was initially put onto the
		// workqueue.
		if key, ok = obj.(string); !ok {
			// As the item in the workqueue is actually invalid, we call
			// Forget here else we'd go into a loop of attempting to
			// process a work item that is invalid.
			c.workqueue.Forget(obj)
			runtime.HandleError(fmt.Errorf("expected string in workqueue but got %#v", obj))
			return nil
		}
		// Run the syncHandler, passing it the namespace/name string of the
		// Bus resource to be synced.
		if err := c.syncHandler(key); err != nil {
			return fmt.Errorf("error syncing bus '%s': %s", key, err.Error())
		}
		// Finally, if no error occurs we Forget this item so it does not
		// get queued again until another change happens.
		c.workqueue.Forget(obj)
		glog.Infof("Successfully synced bus '%s'", key)
		return nil
	}(obj)

	if err != nil {
		runtime.HandleError(err)
		return true
	}

	return true
}

// syncHandler compares the actual state with the desired, and attempts to
// converge the two. It then updates the Status block of the Bus resource
// with the current status of the resource.
func (c *Controller) syncHandler(key string) error {
	// Convert the namespace/name string into a distinct namespace and name
	namespace, name, err := cache.SplitMetaNamespaceKey(key)
	if err != nil {
		runtime.HandleError(fmt.Errorf("invalid resource key: %s", key))
		return nil
	}

	// Get the Bus resource with this namespace/name
	bus, err := c.busesLister.Buses(namespace).Get(name)
	if err != nil {
		// The Bus resource may no longer exist, in which case we stop
		// processing.
		if errors.IsNotFound(err) {
			runtime.HandleError(fmt.Errorf("bus '%s' in work queue no longer exists", key))
			return nil
		}

		return err
	}

	var serviceAccount *corev1.ServiceAccount
	var clusterRoleBinding *rbacv1beta1.ClusterRoleBinding
	var dispatcherService *corev1.Service
	var dispatcherDeployment, provisionerDeployment *appsv1.Deployment
	var saErr, clusterRoleBindingErr, dispatcherServiceErr, dispatcherDeplErr, provisionerDeplError error

	// Sync ServiceAccount derived from the Bus
	serviceAccount, saErr = c.syncBusServiceAccount(bus)
	if saErr != nil {
		_ = c.updateBusStatus(bus,
			dispatcherService, dispatcherServiceErr,
			dispatcherDeployment, dispatcherDeplErr,
			provisionerDeployment, provisionerDeplError,
			serviceAccount, saErr,
			clusterRoleBinding, clusterRoleBindingErr)
		return saErr
	}

	// Sync ClusterRoleBinding derived from the Bus
	clusterRoleBinding, clusterRoleBindingErr = c.syncBusClusterRoleBinding(bus)
	if clusterRoleBindingErr != nil {
		_ = c.updateBusStatus(bus,
			dispatcherService, dispatcherServiceErr,
			dispatcherDeployment, dispatcherDeplErr,
			provisionerDeployment, provisionerDeplError,
			serviceAccount, saErr,
			clusterRoleBinding, clusterRoleBindingErr)
		return clusterRoleBindingErr
	}

	// Sync Service derived from the Bus
	dispatcherService, dispatcherServiceErr = c.syncBusDispatcherService(bus)
	if dispatcherServiceErr != nil {
		_ = c.updateBusStatus(bus,
			dispatcherService, dispatcherServiceErr,
			dispatcherDeployment, dispatcherDeplErr,
			provisionerDeployment, provisionerDeplError,
			serviceAccount, saErr,
			clusterRoleBinding, clusterRoleBindingErr)
		return dispatcherServiceErr
	}

	// Sync Deployment derived from the Bus
	dispatcherDeployment, dispatcherDeplErr = c.syncBusDispatcherDeployment(bus)
	if dispatcherDeplErr != nil {
		_ = c.updateBusStatus(bus,
			dispatcherService, dispatcherServiceErr,
			dispatcherDeployment, dispatcherDeplErr,
			provisionerDeployment, provisionerDeplError,
			serviceAccount, saErr,
			clusterRoleBinding, clusterRoleBindingErr)
		return dispatcherDeplErr
	}

	// Sync Deployment derived from the Bus
	provisionerDeployment, provisionerDeplError = c.syncBusProvisionerDeployment(bus)
	if provisionerDeplError != nil {
		_ = c.updateBusStatus(bus,
			dispatcherService, dispatcherServiceErr,
			dispatcherDeployment, dispatcherDeplErr,
			provisionerDeployment, provisionerDeplError,
			serviceAccount, saErr,
			clusterRoleBinding, clusterRoleBindingErr)
		return provisionerDeplError
	}

	// Finally, we update the status block of the Bus resource to reflect the
	// current state of the world
	err = c.updateBusStatus(bus,
		dispatcherService, dispatcherServiceErr,
		dispatcherDeployment, dispatcherDeplErr,
		provisionerDeployment, provisionerDeplError,
		serviceAccount, saErr,
		clusterRoleBinding, clusterRoleBindingErr)
	if err != nil {
		return err
	}

	c.recorder.Event(bus, corev1.EventTypeNormal, SuccessSynced, MessageResourceSynced)
	return nil
}

func (c *Controller) syncBusDispatcherService(bus *channelsv1alpha1.Bus) (*corev1.Service, error) {
	// Get the service with the specified service name
	serviceName := controller.BusDispatcherServiceName(bus.ObjectMeta.Name)
	service, err := c.servicesLister.Services(bus.Namespace).Get(serviceName)
	// If the resource doesn't exist, we'll create it
	if errors.IsNotFound(err) {
		service, err = c.kubeclientset.CoreV1().Services(bus.Namespace).Create(newDispatcherService(bus))
	}

	// If an error occurs during Get/Create, we'll requeue the item so we can
	// attempt processing again later. This could have been caused by a
	// temporary network failure, or any other transient reason.
	if err != nil {
		return nil, err
	}

	// If the Service is not controlled by this Bus resource, we should log
	// a warning to the event recorder and return
	if !metav1.IsControlledBy(service, bus) {
		msg := fmt.Sprintf(MessageResourceExists, service.Name)
		c.recorder.Event(bus, corev1.EventTypeWarning, ErrResourceExists, msg)
		return nil, fmt.Errorf(msg)
	}

	return service, nil
}

func (c *Controller) syncBusDispatcherDeployment(bus *channelsv1alpha1.Bus) (*appsv1.Deployment, error) {
	// Get the deployment with the specified deployment name
	deploymentName := controller.BusDispatcherDeploymentName(bus.ObjectMeta.Name)
	deployment, err := c.deploymentsLister.Deployments(bus.Namespace).Get(deploymentName)
	// If the resource doesn't exist, we'll create it
	if errors.IsNotFound(err) {
		deployment, err = c.kubeclientset.AppsV1().Deployments(bus.Namespace).Create(newDispatcherDeployment(bus))
	}

	// If an error occurs during Get/Create, we'll requeue the item so we can
	// attempt processing again later. This could have been caused by a
	// temporary network failure, or any other transient reason.
	if err != nil {
		return nil, err
	}

	// If the Deployment is not controlled by this Bus resource, we should log
	// a warning to the event recorder and return
	if !metav1.IsControlledBy(deployment, bus) {
		msg := fmt.Sprintf(MessageResourceExists, deployment.Name)
		c.recorder.Event(bus, corev1.EventTypeWarning, ErrResourceExists, msg)
		return nil, fmt.Errorf(msg)
	}

	// If the Deployment does not match the Bus's proposed Deployment we should update
	// the Deployment resource.
	proposedDeployment := newDispatcherDeployment(bus)
	if !reflect.DeepEqual(proposedDeployment.Spec, deployment.Spec) {
		glog.V(4).Infof("Bus %s dispatcher spec updated", bus.Name)
		deployment, err = c.kubeclientset.AppsV1().Deployments(bus.Namespace).Update(proposedDeployment)

		if err != nil {
			return nil, err
		}
	}

	return deployment, nil
}

func (c *Controller) syncBusServiceAccount(bus *channelsv1alpha1.Bus) (*corev1.ServiceAccount, error) {
	// Get the serviceAccount with the specified serviceAccount name
	serviceAccountName := controller.BusServiceAccountName(bus.ObjectMeta.Name)
	serviceAccount, err := c.serviceAccountsLister.ServiceAccounts(bus.Namespace).Get(serviceAccountName)
	// If the resource doesn't exist, we'll create it
	if errors.IsNotFound(err) {
		serviceAccount, err = c.kubeclientset.CoreV1().ServiceAccounts(bus.Namespace).Create(newServiceAccount(bus))
	}

	// If an error occurs during Get/Create, we'll requeue the item so we can
	// attempt processing again later. This could have been caused by a
	// temporary network failure, or any other transient reason.
	if err != nil {
		return nil, err
	}

	// If the ServiceAccount is not controlled by this Bus resource, we should log
	// a warning to the event recorder and return
	if !metav1.IsControlledBy(serviceAccount, bus) {
		msg := fmt.Sprintf(MessageResourceExists, serviceAccount.Name)
		c.recorder.Event(bus, corev1.EventTypeWarning, ErrResourceExists, msg)
		return nil, fmt.Errorf(msg)
	}

	return serviceAccount, nil
}

func (c *Controller) syncBusClusterRoleBinding(bus *channelsv1alpha1.Bus) (*rbacv1beta1.ClusterRoleBinding, error) {
	// Get the clusterRoleBinding with the specified clusterRoleBinding name
	clusterRoleBindingName := controller.BusClusterRoleBindingName(bus.ObjectMeta.Name)
	clusterRoleBinding, err := c.clusterRoleBindingsLister.Get(clusterRoleBindingName)
	// If the resource doesn't exist, we'll create it
	if errors.IsNotFound(err) {
		clusterRoleBinding, err = c.kubeclientset.RbacV1beta1().ClusterRoleBindings().Create(newClusterRoleBinding(bus))
	}

	// If an error occurs during Get/Create, we'll requeue the item so we can
	// attempt processing again later. This could have been caused by a
	// temporary network failure, or any other transient reason.
	if err != nil {
		return nil, err
	}

	// If the ClusterRoleBinding is not controlled by this Bus resource, we should log
	// a warning to the event recorder and return
	if !metav1.IsControlledBy(clusterRoleBinding, bus) {
		msg := fmt.Sprintf(MessageResourceExists, clusterRoleBinding.Name)
		c.recorder.Event(bus, corev1.EventTypeWarning, ErrResourceExists, msg)
		return nil, fmt.Errorf(msg)
	}

	// If the ClusterRoleBinding does not match the Bus's proposed ClusterRoleBinding we
	// should update the ClusterRoleBinding resource.
	proposedClusterRoleBinding := newClusterRoleBinding(bus)
	if !reflect.DeepEqual(proposedClusterRoleBinding.Subjects, clusterRoleBinding.Subjects) &&
		!reflect.DeepEqual(proposedClusterRoleBinding.RoleRef, clusterRoleBinding.RoleRef) {
		glog.V(4).Infof("Bus %s provisioner spec updated", bus.Name)
		clusterRoleBinding, err = c.kubeclientset.RbacV1beta1().ClusterRoleBindings().Update(proposedClusterRoleBinding)

		if err != nil {
			return nil, err
		}
	}

	return clusterRoleBinding, nil
}

func (c *Controller) syncBusProvisionerDeployment(bus *channelsv1alpha1.Bus) (*appsv1.Deployment, error) {
	provisioner := bus.Spec.Provisioner

	// Get the deployment with the specified deployment name
	deploymentName := controller.BusProvisionerDeploymentName(bus.ObjectMeta.Name)
	deployment, err := c.deploymentsLister.Deployments(bus.Namespace).Get(deploymentName)

	// If the resource shouldn't exists
	if provisioner == nil {
		// If the resource exists, we'll delete it
		if deployment != nil {
			err = c.kubeclientset.AppsV1().Deployments(bus.Namespace).Delete(deploymentName, nil)
		}
		if errors.IsNotFound(err) {
			return nil, nil
		}
		return nil, err
	}

	// If the resource doesn't exist, we'll create it
	if errors.IsNotFound(err) {
		deployment, err = c.kubeclientset.AppsV1().Deployments(bus.Namespace).Create(newProvisionerDeployment(bus))
	}

	// If an error occurs during Get/Create, we'll requeue the item so we can
	// attempt processing again later. This could have been caused by a
	// temporary network failure, or any other transient reason.
	if err != nil {
		return nil, err
	}

	// If the Deployment is not controlled by this Bus resource, we should log
	// a warning to the event recorder and return
	if !metav1.IsControlledBy(deployment, bus) {
		msg := fmt.Sprintf(MessageResourceExists, deployment.Name)
		c.recorder.Event(bus, corev1.EventTypeWarning, ErrResourceExists, msg)
		return nil, fmt.Errorf(msg)
	}

	// If the Deployment does not match the Bus's proposed Deployment we should update
	// the Deployment resource.
	proposedDeployment := newProvisionerDeployment(bus)
	if !reflect.DeepEqual(proposedDeployment.Spec, deployment.Spec) {
		glog.V(4).Infof("Bus %s provisioner spec updated", bus.Name)
		deployment, err = c.kubeclientset.AppsV1().Deployments(bus.Namespace).Update(proposedDeployment)

		if err != nil {
			return nil, err
		}
	}

	return deployment, nil
}

func (c *Controller) updateBusStatus(
	bus *channelsv1alpha1.Bus,
	dispatcherService *corev1.Service, dispatcherServiceErr error,
	dispatcherDeployment *appsv1.Deployment, dispatcherDeploymentErr error,
	provisionerDeployment *appsv1.Deployment, provisionerDeploymentErr error,
	serviceAccount *corev1.ServiceAccount, serviceAccountErr error,
	clusterRoleBinding *rbacv1beta1.ClusterRoleBinding, clusterRoleBindingErr error,
) error {
	// NEVER modify objects from the store. It's a read-only, local cache.
	// You can use DeepCopy() to make a deep copy of original object and modify this copy
	// Or create a copy manually for better performance
	busCopy := bus.DeepCopy()

	if dispatcherService != nil {
		busCopy.Status.Service = &corev1.LocalObjectReference{Name: dispatcherService.Name}
		serviceCondition := util.NewBusCondition(channelsv1alpha1.BusServiceable, corev1.ConditionTrue, ServiceSynced, "service successfully synced")
		util.SetBusCondition(&busCopy.Status, *serviceCondition)
	} else {
		busCopy.Status.Service = nil
		serviceCondition := util.NewBusCondition(channelsv1alpha1.BusServiceable, corev1.ConditionFalse, ServiceError, dispatcherServiceErr.Error())
		util.SetBusCondition(&busCopy.Status, *serviceCondition)
	}

	if dispatcherDeployment != nil {
		dispatchCondition := util.NewBusCondition(channelsv1alpha1.BusDispatching, corev1.ConditionTrue, DeploymentSynced, "deployment successfully synced")
		util.SetBusCondition(&busCopy.Status, *dispatchCondition)
	} else {
		dispatchCondition := util.NewBusCondition(channelsv1alpha1.BusDispatching, corev1.ConditionFalse, DeploymentError, dispatcherDeploymentErr.Error())
		util.SetBusCondition(&busCopy.Status, *dispatchCondition)
	}

	if provisionerDeployment != nil {
		provisionCondition := util.NewBusCondition(channelsv1alpha1.BusProvisioning, corev1.ConditionTrue, DeploymentSynced, "deployment successfully synced")
		util.SetBusCondition(&busCopy.Status, *provisionCondition)
	} else if provisionerDeploymentErr != nil {
		provisionCondition := util.NewBusCondition(channelsv1alpha1.BusProvisioning, corev1.ConditionFalse, DeploymentError, provisionerDeploymentErr.Error())
		util.SetBusCondition(&busCopy.Status, *provisionCondition)
	} else {
		util.RemoveBusCondition(&busCopy.Status, channelsv1alpha1.BusProvisioning)
	}

	util.ConsolidateBusCondition(busCopy)

	// If the CustomResourceSubresources feature gate is not enabled,
	// we must use Update instead of UpdateStatus to update the Status block of the Bus resource.
	// UpdateStatus will not allow changes to the Spec of the resource,
	// which is ideal for ensuring nothing other than resource status has been updated.
	_, err := c.busclientset.ChannelsV1alpha1().Buses(bus.Namespace).Update(busCopy)
	return err
}

// enqueueBus takes a Bus resource and converts it into a namespace/name
// string which is then put onto the work queue. This method should *not* be
// passed resources of any type other than Bus.
func (c *Controller) enqueueBus(obj interface{}) {
	var key string
	var err error
	if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil {
		runtime.HandleError(err)
		return
	}
	c.workqueue.AddRateLimited(key)
}

// handleObject will take any resource implementing metav1.Object and attempt
// to find the Bus resource that 'owns' it. It does this by looking at the
// objects metadata.ownerReferences field for an appropriate OwnerReference.
// It then enqueues that Bus resource to be processed. If the object does not
// have an appropriate OwnerReference, it will simply be skipped.
func (c *Controller) handleObject(obj interface{}) {
	var object metav1.Object
	var ok bool
	if object, ok = obj.(metav1.Object); !ok {
		tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
		if !ok {
			runtime.HandleError(fmt.Errorf("error decoding object, invalid type"))
			return
		}
		object, ok = tombstone.Obj.(metav1.Object)
		if !ok {
			runtime.HandleError(fmt.Errorf("error decoding object tombstone, invalid type"))
			return
		}
		glog.V(4).Infof("Recovered deleted object '%s' from tombstone", object.GetName())
	}
	glog.V(4).Infof("Processing object: %s", object.GetName())
	if ownerRef := metav1.GetControllerOf(object); ownerRef != nil {
		// If this object is not owned by a Bus, we should not do anything more
		// with it.
		if ownerRef.Kind != "Bus" {
			return
		}

		bus, err := c.busesLister.Buses(object.GetNamespace()).Get(ownerRef.Name)
		if err != nil {
			glog.V(4).Infof("ignoring orphaned object '%s' of bus '%s'", object.GetSelfLink(), ownerRef.Name)
			return
		}

		c.enqueueBus(bus)
		return
	}
}

// newDispatcherService creates a new Service for a Bus resource. It also sets
// the appropriate OwnerReferences on the resource so handleObject can discover
// the Bus resource that 'owns' it.
func newDispatcherService(bus *channelsv1alpha1.Bus) *corev1.Service {
	labels := map[string]string{
		"bus":  bus.Name,
		"role": "dispatcher",
	}
	return &corev1.Service{
		ObjectMeta: metav1.ObjectMeta{
			Name:      controller.BusDispatcherServiceName(bus.ObjectMeta.Name),
			Namespace: bus.Namespace,
			Labels:    labels,
			OwnerReferences: []metav1.OwnerReference{
				*metav1.NewControllerRef(bus, schema.GroupVersionKind{
					Group:   channelsv1alpha1.SchemeGroupVersion.Group,
					Version: channelsv1alpha1.SchemeGroupVersion.Version,
					Kind:    "Bus",
				}),
			},
		},
		Spec: corev1.ServiceSpec{
			Selector: labels,
			Ports: []corev1.ServicePort{
				{
					Name:       "http",
					Port:       80,
					TargetPort: intstr.FromInt(8080),
				},
			},
		},
	}
}

// newDispatcherDeployment creates a new Deployment for a Bus resource. It also sets
// the appropriate OwnerReferences on the resource so handleObject can discover
// the Bus resource that 'owns' it.
func newDispatcherDeployment(bus *channelsv1alpha1.Bus) *appsv1.Deployment {
	labels := map[string]string{
		"bus":  bus.Name,
		"role": "dispatcher",
	}
	one := int32(1)
	container := bus.Spec.Dispatcher.DeepCopy()
	container.Env = append(container.Env,
		corev1.EnvVar{
			Name:  "PORT",
			Value: "8080",
		},
		corev1.EnvVar{
			Name:  "BUS_NAMESPACE",
			Value: bus.Namespace,
		},
		corev1.EnvVar{
			Name:  "BUS_NAME",
			Value: bus.Name,
		},
	)
	volumes := []corev1.Volume{}
	if bus.Spec.Volumes != nil {
		volumes = *bus.Spec.Volumes
	}
	return &appsv1.Deployment{
		ObjectMeta: metav1.ObjectMeta{
			Name:      controller.BusDispatcherDeploymentName(bus.ObjectMeta.Name),
			Namespace: bus.Namespace,
			OwnerReferences: []metav1.OwnerReference{
				*metav1.NewControllerRef(bus, schema.GroupVersionKind{
					Group:   channelsv1alpha1.SchemeGroupVersion.Group,
					Version: channelsv1alpha1.SchemeGroupVersion.Version,
					Kind:    "Bus",
				}),
			},
		},
		Spec: appsv1.DeploymentSpec{
			Replicas: &one,
			Selector: &metav1.LabelSelector{
				MatchLabels: labels,
			},
			Template: corev1.PodTemplateSpec{
				ObjectMeta: metav1.ObjectMeta{
					Annotations: map[string]string{
						"sidecar.istio.io/inject": "true",
					},
					Labels: labels,
				},
				Spec: corev1.PodSpec{
					ServiceAccountName: controller.BusServiceAccountName(bus.Name),
					Containers: []corev1.Container{
						*container,
					},
					Volumes: volumes,
				},
			},
		},
	}
}

// newServiceAccount creates a new ServiceAccount for a Bus resource. It also sets
// the appropriate OwnerReferences on the resource so handleObject can discover
// the Bus resource that 'owns' it.
func newServiceAccount(bus *channelsv1alpha1.Bus) *corev1.ServiceAccount {
	return &corev1.ServiceAccount{
		ObjectMeta: metav1.ObjectMeta{
			Name:      controller.BusServiceAccountName(bus.ObjectMeta.Name),
			Namespace: bus.Namespace,
			OwnerReferences: []metav1.OwnerReference{
				*metav1.NewControllerRef(bus, schema.GroupVersionKind{
					Group:   channelsv1alpha1.SchemeGroupVersion.Group,
					Version: channelsv1alpha1.SchemeGroupVersion.Version,
					Kind:    "Bus",
				}),
			},
		},
	}
}

// newClusterRoleBinding creates a new ClusterRoleBinding for a Bus resource. It also sets
// the appropriate OwnerReferences on the resource so handleObject can discover
// the Bus resource that 'owns' it.
func newClusterRoleBinding(bus *channelsv1alpha1.Bus) *rbacv1beta1.ClusterRoleBinding {
	return &rbacv1beta1.ClusterRoleBinding{
		ObjectMeta: metav1.ObjectMeta{
			Name:      controller.BusClusterRoleBindingName(bus.ObjectMeta.Name),
			Namespace: bus.Namespace,
			OwnerReferences: []metav1.OwnerReference{
				*metav1.NewControllerRef(bus, schema.GroupVersionKind{
					Group:   channelsv1alpha1.SchemeGroupVersion.Group,
					Version: channelsv1alpha1.SchemeGroupVersion.Version,
					Kind:    "Bus",
				}),
			},
		},
		Subjects: []rbacv1beta1.Subject{
			{
				Kind:      "ServiceAccount",
				Name:      controller.BusServiceAccountName(bus.ObjectMeta.Name),
				Namespace: bus.Namespace,
			},
		},
		RoleRef: rbacv1beta1.RoleRef{
			Kind:     "ClusterRole",
			Name:     "knative-channels-bus",
			APIGroup: "rbac.authorization.k8s.io",
		},
	}
}

// newProvisionerDeployment creates a new Deployment for a Bus resource. It also sets
// the appropriate OwnerReferences on the resource so handleObject can discover
// the Bus resource that 'owns' it.
func newProvisionerDeployment(bus *channelsv1alpha1.Bus) *appsv1.Deployment {
	labels := map[string]string{
		"bus":  bus.Name,
		"role": "provisioner",
	}
	one := int32(1)
	container := bus.Spec.Provisioner.DeepCopy()
	container.Env = append(container.Env,
		corev1.EnvVar{
			Name:  "BUS_NAMESPACE",
			Value: bus.Namespace,
		},
		corev1.EnvVar{
			Name:  "BUS_NAME",
			Value: bus.Name,
		},
	)
	volumes := []corev1.Volume{}
	if bus.Spec.Volumes != nil {
		volumes = *bus.Spec.Volumes
	}
	return &appsv1.Deployment{
		ObjectMeta: metav1.ObjectMeta{
			Name:      controller.BusProvisionerDeploymentName(bus.ObjectMeta.Name),
			Namespace: bus.Namespace,
			OwnerReferences: []metav1.OwnerReference{
				*metav1.NewControllerRef(bus, schema.GroupVersionKind{
					Group:   channelsv1alpha1.SchemeGroupVersion.Group,
					Version: channelsv1alpha1.SchemeGroupVersion.Version,
					Kind:    "Bus",
				}),
			},
		},
		Spec: appsv1.DeploymentSpec{
			Replicas: &one,
			Selector: &metav1.LabelSelector{
				MatchLabels: labels,
			},
			Template: corev1.PodTemplateSpec{
				ObjectMeta: metav1.ObjectMeta{
					Annotations: map[string]string{
						"sidecar.istio.io/inject": "true",
					},
					Labels: labels,
				},
				Spec: corev1.PodSpec{
					ServiceAccountName: controller.BusServiceAccountName(bus.Name),
					Containers: []corev1.Container{
						*container,
					},
					Volumes: volumes,
				},
			},
		},
	}
}

repository: sijie/eventing

repo_name: sijie/eventing


text:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

int main ()
{
    int op;
    float v1,v2,r;
    printf("Escolha uma operação:\n1. Somar\n2. Subtrair\n3. Multiplicar\n4.Dividir\n");
    scanf("%i",&op);
    if (op<1 || op>4)
    printf("Opçao invalida\n ");
    else
    {
        printf("Digite o primeiro valor\n");
        scanf("%f",&v1);
        printf("Digite o segundo valor\n");
        scanf("%f",&v2);
        if(op == 4 && v2==0)
        printf("Nao existe divisao por zero\n");
        else
        {
            switch(op)
            {
                      case 1:
                           r=v1+v2;
                      break;
                      case 2:
                           r=v1-v2;
                      break;
                      case 3:
                           r=v1*v2;
                      break;
                      case 4:
                           r=v1/v2;
                      break;
                      }
                      printf("O resultado eh: %f ",r);

        }
    }
    system("PAUSE");
    return (0);
}

repository: MateusAttie/C

path: /Seleção/Vogal ou nao switch.cpp

repo_name: MateusAttie/C

extension: cpp

filename: Vogal ou nao switch.cpp