text:
26.67" y="17.78" smashed="yes" rot="R90">
<attribute name="NAME" x="22.225" y="18.669" size="0.8128" layer="25" ratio="10"/>
<attribute name="VALUE" x="24.13" y="13.843" size="0.8128" layer="27" ratio="10" rot="R90"/>
</element>
<element name="D1" library="SaintGimp" package="ZDIO-7.5" value="22V" x="41.91" y="17.78" smashed="yes" rot="R270">
<attribute name="NAME" x="41.3258" y="22.8092" size="0.8128" layer="25" ratio="10"/>
<attribute name="VALUE" x="39.497" y="20.32" size="0.8128" layer="27" ratio="10" rot="R270"/>
</element>
<element name="D2" library="SaintGimp" package="ZDIO-7.5" value="27V" x="46.99" y="17.78" smashed="yes" rot="R270">
<attribute name="NAME" x="46.5328" y="22.7838" size="0.8128" layer="25" ratio="10"/>
<attribute name="VALUE" x="44.577" y="20.32" size="0.8128" layer="27" ratio="10" rot="R270"/>
</element>
<element name="R6" library="SaintGimp" package="AXIAL-7.5MM" value="1K" x="49.53" y="17.78" smashed="yes" rot="R270">
<attribute name="NAME" x="49.022" y="22.86" size="0.8128" layer="25"/>
<attribute name="VALUE" value="" x="49.53" y="17.78" size="1.778" layer="27" rot="R270" display="off"/>
<attribute name="VALUE" x="50.038" y="15.748" size="0.8128" layer="21" ratio="10" rot="R90"/>
</element>
<element name="C5" library="SaintGimp" package="CAPACITOR-2.5MM" value="0.1uF" x="44.45" y="17.78" smashed="yes" rot="R270">
<attribute name="NAME" x="43.942" y="20.574" size="0.8128" layer="25"/>
<attribute name="VALUE" x="42.164" y="19.685" size="0.8128" layer="27" rot="R270"/>
</element>
<element name="R5" library="SaintGimp" package="AXIAL-7.5MM" value="1K" x="39.37" y="17.78" smashed="yes" rot="R90">
<attribute name="NAME" x="38.862" y="22.86" size="0.8128" layer="25"/>
<attribute name="VALUE" value="" x="39.37" y="17.78" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="VALUE" x="39.878" y="15.748" size="0.8128" layer="21" ratio="10" rot="R90"/>
</element>
<element name="Q2" library="SaintGimp" package="TO220BH-NO-HOLE" value="IPP80P03P4L-04" x="44.45" y="6.35" smashed="yes" rot="R90">
<attribute name="NAME" x="40.132" y="5.969" size="0.8128" layer="25" ratio="10"/>
<attribute name="VALUE" x="41.91" y="2.413" size="0.8128" layer="27" ratio="10" rot="R90"/>
</element>
<element name="R8" library="SaintGimp" package="AXIAL-7.5MM" value="10K" x="57.15" y="6.35" smashed="yes" rot="R270">
<attribute name="NAME" x="56.642" y="11.43" size="0.8128" layer="25"/>
<attribute name="VALUE" value="" x="57.15" y="6.35" size="1.778" layer="27" rot="R270" display="off"/>
<attribute name="VALUE" x="57.658" y="4.318" size="0.8128" layer="21" ratio="10" rot="R90"/>
</element>
<element name="D3" library="SaintGimp" package="ZDIO-7.5" value="10V" x="54.61" y="6.35" smashed="yes" rot="R270">
<attribute name="NAME" x="53.8988" y="11.3538" size="0.8128" layer="25" ratio="10"/>
<attribute name="VALUE" x="52.197" y="8.89" size="0.8128" layer="27" ratio="10" rot="R270"/>
</element>
<element name="C9" library="SaintGimp" package="CAPACITOR-5MM" value="10uF" x="72.39" y="50.8" smashed="yes">
<attribute name="NAME" x="71.628" y="52.451" size="0.8128" layer="25"/>
<attribute name="VALUE" x="70.485" y="48.514" size="0.8128" layer="27"/>
</element>
<element name="C1" library="SaintGimp" package="CAPACITOR-2.5MM" value="0.1uF" x="27.94" y="28.575" smashed="yes" rot="R90">
<attribute name="NAME" x="27.305" y="24.765" size="0.8128" layer="25"/>
<attribute name="VALUE" x="30.226" y="26.67" size="0.8128" layer="27" rot="R90"/>
</element>
<element name="R3" library="SaintGimp" package="AXIAL-7.5MM" value="220" x="48.26" y="44.45" smashed="yes" rot="R270">
<attribute name="NAME" x="47.498" y="49.53" size="0.8128" layer="25"/>
<attribute name="VALUE" value="" x="48.26" y="44.45" size="1.778" layer="27" rot="R270" display="off"/>
<attribute name="VALUE" x="48.768" y="42.418" size="0.8128" layer="21" ratio="10" rot="R90"/>
</element>
<element name="R4" library="SaintGimp" package="AXIAL-7.5MM" value="220" x="53.34" y="44.45" smashed="yes" rot="R270">
<attribute name="NAME" x="52.832" y="49.53" size="0.8128" layer="25"/>
<attribute name="VALUE" value="" x="53.34" y="44.45" size="1.778" layer="27" rot="R270" display="off"/>
<attribute name="VALUE" x="53.848" y="42.418" size="0.8128" layer="21" ratio="10" rot="R90"/>
</element>
<element name="C6" library="SaintGimp" package="CAPACITOR-2.5MM" value="1uF" x="50.8" y="44.45" smashed="yes" rot="R270">
<attribute name="NAME" x="50.292" y="47.244" size="0.8128" layer="25"/>
<attribute name="VALUE" x="48.514" y="46.355" size="0.8128" layer="27" rot="R270"/>
</element>
<element name="C7" library="SaintGimp" package="CAPACITOR-2.5MM" value="1uF" x="55.88" y="44.45" smashed="yes" rot="R90">
<attribute name="NAME" x="56.388" y="48.006" size="0.8128" layer="25" rot="R180"/>
<attribute name="VALUE" x="58.166" y="42.672" size="0.8128" layer="27" rot="R90"/>
</element>
<element name="Y1" library="SaintGimp" package="CRYSTAL-V" value="16Mhz" x="42.545" y="28.575" smashed="yes" rot="R180">
<attribute name="NAME" x="43.4086" y="25.5524" size="0.8128" layer="25" ratio="10" rot="R180"/>
<attribute name="VALUE" x="47.117" y="32.4358" size="0.8128" layer="27" ratio="10" rot="R180"/>
</element>
<element name="C3" library="SaintGimp" package="CAPACITOR-2.5MM" value="20pF" x="33.02" y="28.575" smashed="yes" rot="R270">
<attribute name="NAME" x="32.131" y="24.892" size="0.8128" layer="25"/>
<attribute name="VALUE" x="30.734" y="29.083" size="0.8128" layer="27" rot="R270"/>
</element>
<element name="C4" library="SaintGimp" package="CAPACITOR-2.5MM" value="20pF" x="35.56" y="28.575" smashed="yes" rot="R270">
<attribute name="NAME" x="34.671" y="24.892" size="0.8128" layer="25"/>
<attribute name="VALUE" x="33.274" y="30.353" size="0.8128" layer="27" rot="R270"/>
</element>
<element name="DC1" library="SaintGimp" package="DC-CONV" value="OKI-78SR-5/1.5-W36H-C" x="67.31" y="39.37" smashed="yes" rot="R180">
<attribute name="NAME" x="72.136" y="33.782" size="0.8128" layer="25" ratio="10" rot="R180"/>
<attribute name="VALUE" x="72.136" y="40.259" size="0.8128" layer="27" ratio="10" rot="R180"/>
</element>
<element name="R2" library="SaintGimp" package="AXIAL-7.5MM" value="10K" x="21.59" y="27.305" smashed="yes">
<attribute name="NAME" x="21.59" y="25.527" size="0.8128" layer="25"/>
<attribute name="VALUE" x="19.558" y="26.797" size="0.8128" layer="21" ratio="10"/>
</element>
<element name="R1" library="SaintGimp" package="AXIAL-7.5MM" value="68" x="21.59" y="29.845" smashed="yes" rot="R180">
<attribute name="NAME" x="23.114" y="31.623" size="0.8128" layer="25" rot="R180"/>
<attribute name="VALUE" x="20.828" y="30.099" size="0.8128" layer="21" ratio="10" rot="R180"/>
</element>
<element name="MOTOR" library="SaintGimp" package="1X04-BIG" value="PINHD-1X4BIG" x="81.28" y="41.91" smashed="yes" rot="R90">
<attribute name="VALUE" x="83.9048375" y="36.83" size="0.8128" layer="27" rot="R90"/>
</element>
<element name="MODE" library="SaintGimp" package="1X02-BIG" value="PINHD-1X2BIG" x="7.62" y="27.94" smashed="yes" rot="R90">
<attribute name="VALUE" x="10.2448375" y="25.4" size="0.8128" layer="27" rot="R90"/>
</element>
<element name="U$2" library="holes" package="4,1" value="" x="5.08" y="49.53" smashed="yes"/>
<element name="U$4" library="holes" package="4,1" value="" x="56.515" y="19.685" smashed="yes"/>
<element name="C8" library="SaintGimp" package="CAPACITOR-5MM" value="10uF" x="62.23" y="50.8" smashed="yes" rot="R180">
<attribute name="NAME" x="62.738" y="53.213" size="0.8128" layer="25" rot="R180"/>
<attribute name="VALUE" x="64.135" y="53.086" size="0.8128" layer="27" rot="R180"/>
</element>
<element name="IC1" library="SaintGimp" package="DIP28" value="ATMEGA328P-PU" x="45.72" y="40.64" smashed="yes" rot="R90">
<attribute name="MPN" value="ATMEGA328P-PU" x="45.72" y="40.64" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="NAME" x="26.3144" y="36.8554" size="0.8128" layer="25" ratio="10" rot="SR0"/>
<attribute name="OC_FARNELL" value="1715487" x="45.72" y="40.64" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="OC_NEWARK" value="15R0268" x="45.72" y="40.64" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="PACKAGE" value="PDIP-28" x="45.72" y="40.64" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="SUPPLIER" value="Atmel" x="45.72" y="40.64" size="1.778" layer="27" rot="R90" display="off"/>
<attribute name="VALUE" x="47.879" y="33.1216" size="0.8128" layer="27" ratio="10" rot="SR90"/>
</element>
<element name="C2" library="SaintGimp" package="CAPACITOR-2.5MM" value="0.1uF" x="31.75" y="43.18" smashed="yes">
<attribute name="NAME" x="27.432" y="42.672" size="0.8128" layer="25"/>
<attribute name="VALUE" x="31.242" y="40.894" size="0.8128" layer="27"/>
</element>
<element name="ISP1" library="SaintGimp" package="ICSP-HEADER" value="ICSP-HEADER-6" x="39.37" y="48.26" smashed="yes" rot="R90">
<attribute name="NAME" x="42.418" y="45.466" size="0.8128" layer="25" rot="R180"/>
</element>
<element name="FOOT" library="SaintGimp" package="1X02-BIG" value="PINHD-1X2BIG" x="7.62" y="33.02" smashed="yes" rot="R90">
<attribute name="VALUE" x="10.2448375" y="30.48" size="0.8128" layer="27" rot="R90"/>
</element>
<element name="SIDE_EXP" library="SaintGimp" package="1X03-BIG" value="PINHD-1X3BIG" x="7.62" y="21.59" smashed="yes" rot="R90">
<attribute name="VALUE" x="10.2448375" y="17.78" size="0.8128" layer="27" rot="R90"/>
</element>
<element name="Q3" library="SaintGimp" package="TO220BH-NO-HOLE" value="SUP53P06-20-H-NH" x="66.04" y="15.112503125" smashed="yes" rot="R180">
<attribute name="NAME" x="69.85" y="9.905503125" size="0.8128" layer="25" ratio="10" rot="R180"/>
<attribute name="VALUE" x="69.977" y="12.572503125" size="0.8128" layer="27" ratio="10" rot="R180"/>
</element>
<element name="R7" library="SaintGimp" package="AXIAL-7.5MM" value="576K" x="58.42" y="27.305" smashed="yes">
<attribute name="NAME" x="52.07" y="27.051" size="0.8128" layer="25"/>
<attribute name="VALUE" x="56.388" y="26.797" size="0.8128" layer="21" ratio="10"/>
</element>
<element name="D4" library="SaintGimp" package="ZDIO-7.5" value="10V" x="66.04" y="24.765" smashed="yes">
<attribute name="NAME" x="59.69" y="24.5618" size="0.8128" layer="25" ratio="10"/>
<attribute name="VALUE" x="63.5" y="22.352" size="0.8128" layer="27" ratio="10"/>
</element>
<element name="C10" library="SaintGimp" package="CAPACITOR-2.5MM" value="1uF" x="66.04" y="27.305" smashed="yes">
<attribute name="NAME" x="68.834" y="26.924" size="0.8128" layer="25"/>
<attribute name="VALUE" x="64.262" y="25.019" size="0.8128" layer="27"/>
</element>
</elements>
<signals>
<signal name="GND">
<contactref element="C11" pad="-"/>
<contactref element="Q1" pad="P1"/>
<contactref element="R5" pad="P$1"/>
<contactref element="C5" pad="2"/>
<contactref element="R8" pad="P$1"/>
<contactref element="24VIN" pad="1"/>
<contactref element="C9" pad="2"/>
<contactref element="24VOUT" pad="2"/>
<contactref element="C7" pad="2"/>
<contactref element="C1" pad="1"/>
<contactref element="C3" pad="2"/>
<contactref element="C4" pad="2"/>
<contactref element="C6" pad="2"/>
<contactref element="DC1" pad="P2"/>
<polygon width="0.4064" layer="16" isolate="0.2794">
<vertex x="1.27" y="53.34"/>
<vertex x="1.27" y="1.27"/>
<vertex x="87.63" y="1.27"/>
<vertex x="87.63" y="53.34"/>
</polygon>
<contactref element="C8" pad="2"/>
<contactref element="IC1" pad="8"/>
<contactref element="IC1" pad="22"/>
<contactref element="C2" pad="1"/>
<contactref element="MOTOR" pad="4"/>
<contactref element="MODE" pad="1"/>
<contactref element="FRONT" pad="2"/>
<contactref element="RAMP" pad="2"/>
<contactref element="ISP1" pad="6"/>
<contactref element="FOOT" pad="1"/>
<contactref element="SIDE_EXP" pad="2"/>
<contactref element="R7" pad="P$1"/>
</signal>
<signal name="N$5">
<contactref element="R6" pad="P$1"/>
<contactref element="D2" pad="C"/>
<wire x1="46.99" y1="21.59" x2="49.53" y2="21.59" width="0.254" layer="1"/>
</signal>
<signal name="N$6">
<contactref element="D2" pad="A"/>
<contactref element="D1" pad="A"/>
<wire x1="41.91" y1="13.97" x2="46.99" y2="13.97" width="0.254" layer="1"/>
</signal>
<signal name="N$7">
<contactref element="Q1" pad="P3"/>
<contactref element="D1" pad="C"/>
<contactref element="C5" pad="1"/>
<contactref element="R5" pad="P$2"/>
<wire x1="39.37" y1="21.59" x2="41.91" y2="21.59" width="0.254" layer="1"/>
<wire x1="41.91" y1="21.59" x2="44.45" y2="19.05" width="0.254" layer="1"/>
<wire x1="39.37" y1="21.59" x2="34.29" y2="21.59" width="0.254" layer="1"/>
<wire x1="34.29" y1="21.59" x2="33.02" y2="20.32" width="0.254" layer="1"/>
</signal>
<signal name="24V" class="1">
<contactref element="F1" pad="2"/>
<contactref element="R6" pad="P$2"/>
<contactref element="Q1" pad="P2"/>
<contactref element="Q2" pad="P2"/>
<wire x1="41.91" y1="6.35" x2="50.8" y2="6.35" width="1.778" layer="1"/>
<wire x1="49.53" y1="13.97" x2="41.91" y2="6.35" width="0.6096" layer="1"/>
<wire x1="22.86" y1="6.35" x2="22.86" y2="10.16" width="1.778" layer="1"/>
<wire x1="22.86" y1="10.16" x2="30.48" y2="17.78" width="1.778" layer="1"/>
<wire x1="30.48" y1="17.78" x2="33.02" y2="17.78" width="1.778" layer="1"/>
<wire x1="33.02" y1="17.78" x2="35.56" y2="17.78" width="1.778" layer="1"/>
<wire x1="35.56" y1="17.78" x2="36.83" y2="16.51" width="1.778" layer="1"/>
<wire x1="36.83" y1="16.51" x2="36.83" y2="11.43" width="1.778" layer="1"/>
<wire x1="36.83" y1="11.43" x2="41.91" y2="6.35" width="1.778" layer="1"/>
</signal>
<signal name="N$4">
<contactref element="Q2" pad="P1"/>
<contactref element="R8" pad="P$2"/>
<contactref element="D3" pad="A"/>
<wire x1="54.61" y1="2.54" x2="57.15" y2="2.54" width="0.254" layer="1"/>
<wire x1="54.61" y1="2.54" x2="53.34" y2="3.81" width="0.254" layer="1"/>
<wire x1="53.34" y1="3.81" x2="50.8" y2="3.81" width="0.254" layer="1"/>
</signal>
<signal name="N$3">
<contactref element="F1" pad="1"/>
<contactref element="24VIN" pad="2"/>
<wire x1="7.62" y1="11.43" x2="2.54" y2="6.35" width="1.778" layer="1"/>
<wire x1="7.62" y1="11.43" x2="7.62" y2="13.97" width="1.778" layer="1"/>
</signal>
<signal name="24V-PROTECTED" class="1">
<contactref element="DC1" pad="P1"/>
<contactref element="C8" pad="1"/>
<wire x1="84.455" y1="46.355" x2="82.55" y2="48.26" width="0.6096" layer="1"/>
<contactref element="Q3" pad="P2"/>
<wire x1="63.5" y1="43.815" x2="74.295" y2="43.815" width="0.6096" layer="1"/>
<wire x1="74.295" y1="43.815" x2="78.74" y2="48.26" width="0.6096" layer="1"/>
<wire x1="78.74" y1="48.26" x2="82.55" y2="48.26" width="0.6096" layer="1"/>
<wire x1="66.04" y1="21.462503125" x2="66.04" y2="19.05" width="1.778" layer="1"/>
<wire x1="66.04" y1="19.05" x2="67.31" y2="17.78" width="1.778" layer="1"/>
<wire x1="67.31" y1="17.78" x2="72.39" y2="17.78" width="1.778" layer="1"/>
<contactref element="24VOUT" pad="1"/>
<contactref element="C11" pad="+"/>
<wire x1="81.28" y1="33.02" x2="82.55" y2="33.02" width="0.6096" layer="1"/>
<wire x1="82.55" y1="33.02" x2="84.455" y2="34.925" width="0.6096" layer="1"/>
<wire x1="84.455" y1="34.925" x2="84.455" y2="46.355" width="0.6096" layer="1"/>
<wire x1="82.55" y1="31.75" x2="81.28" y2="33.02" width="1.778" layer="1"/>
<wire x1="63.5" y1="43.815" x2="62.865" y2="44.45" width="0.6096" layer="1"/>
<wire x1="62.865" y1="44.45" x2="62.865" y2="48.895" width="0.6096" layer="1"/>
<wire x1="62.865" y1="48.895" x2="64.77" y2="50.8" width="0.6096" layer="1"/>
<wire x1="64.77" y1="46.99" x2="64.77" y2="50.8" width="0.6096" layer="1"/>
<wire x1="82.55" y1="31.75" x2="82.55" y2="27.94" width="1.778" layer="1"/>
<wire x1="82.55" y1="27.94" x2="72.39" y2="17.78" width="1.778" layer="1"/>
</signal>
<signal name="START_IN">
<contactref element="FRONT" pad="7"/>
<contactref element="IC1" pad="26"/>
<contactref element="FOOT" pad="2"/>
<wire x1="12.7" y1="35.56" x2="17.78" y2="40.64" width="0.254" layer="1"/>
<wire x1="12.7" y1="35.56" x2="11.43" y2="35.56" width="0.254" layer="1"/>
<wire x1="11.43" y1="35.56" x2="10.16" y2="34.29" width="0.254" layer="1"/>
<wire x1="10.16" y1="34.29" x2="7.62" y2="34.29" width="0.254" layer="1"/>
<wire x1="17.78" y1="40.64" x2="12.7" y2="45.72" width="0.254" layer="1"/>
<wire x1="12.7" y1="45.72" x2="12.7" y2="46.99" width="0.254" layer="1"/>
</signal>
<signal name="RAMP_IN">
<contactref element="RAMP" pad="3"/>
<contactref element="IC1" pad="28"/>
<wire x1="12.7" y1="40.64" x2="11.43" y2="41.91" width="0.254" layer="1"/>
<wire x1="11.43" y1="41.91" x2="7.62" y2="41.91" width="0.254" layer="1"/>
</signal>
<signal name="MODE_IN">
<contactref element="MODE" pad="2"/>
<contactref element="IC1" pad="4"/>
<wire x1="19.05" y1="34.29" x2="20.32" y2="33.02" width="0.254" layer="1"/>
<wire x1="19.05" y1="34.29" x2="11.43" y2="34.29" width="0.254" layer="1"/>
<wire x1="11.43" y1="34.29" x2="10.16" y2="33.02" width="0.254" layer="1"/>
<wire x1="10.16" y1="33.02" x2="10.16" y2="31.115" width="0.254" layer="1"/>
<wire x1="10.16" y1="31.115" x2="8.255" y2="29.21" width="0.254" layer="1"/>
<wire x1="8.255" y1="29.21" x2="7.62" y2="29.21" width="0.254" layer="1"/>
</signal>
<signal name="RPM_IN">
<contactref element="MOTOR" pad="1"/>
<wire x1="78.74" y1="36.83" x2="80.01" y2="38.1" width="0.254" layer="1"/>
<wire x1="80.01" y1="38.1" x2="81.28" y2="38.1" width="0.254" layer="1"/>
<wire x1="78.74" y1="36.83" x2="78.74" y2="31.75" width="0.254" layer="1"/>
<wire x1="78.74" y1="31.75" x2="76.2" y2="29.21" width="0.254" layer="1"/>
<wire x1="76.2" y1="29.21" x2="53.34" y2="29.21" width="0.254" layer="1"/>
<contactref element="IC1" pad="5"/>
<wire x1="53.34" y1="29.21" x2="48.26" y2="24.13" width="0.254" layer="1"/>
<wire x1="48.26" y1="24.13" x2="24.13" y2="24.13" width="0.254" layer="1"/>
<via x="22.86" y="27.305" extent="1-16" drill="0.5"/>
<wire x1="22.86" y1="27.305" x2="22.86" y2="29.845" width="0.254" layer="16"/>
<via x="22.86" y="29.845" extent="1-16" drill="0.5"/>
<wire x1="22.86" y1="29.845" x2="22.86" y2="33.02" width="0.254" layer="1"/>
<wire x1="22.86" y1="27.305" x2="22.86" y2="25.4" width="0.254" layer="1"/>
<wire x1="22.86" y1="25.4" x2="24.13" y2="24.13" width="0.254" layer="1"/>
</signal>
<signal name="SPD_OUT">
<contactref element="IC1" pad="15"/>
<contactref element="R3" pad="P$2"/>
<wire x1="45.72" y1="40.64" x2="48.26" y2="40.64" width="0.254" layer="1"/>
</signal>
<signal name="DIR_OUT">
<contactref element="MOTOR" pad="2"/>
<contactref element="IC1" pad="16"/>
<wire x1="81.28" y1="40.64" x2="80.01" y2="40.64" width="0.254" layer="1"/>
<wire x1="80.01" y1="40.64" x2="78.105" y2="38.735" width="0.254" layer="1"/>
<wire x1="78.105" y1="38.735" x2="78.105" y2="32.385" width="0.254" layer="1"/>
<wire x1="78.105" y1="32.385" x2="75.565" y2="29.845" width="0.254" layer="1"/>
<wire x1="75.565" y1="29.845" x2="53.34" y2="29.845" width="0.254" layer="1"/>
<wire x1="53.34" y1="29.845" x2="43.18" y2="40.005" width="0.254" layer="1"/>
<wire x1="43.18" y1="40.005" x2="43.18" y2="40.64" width="0.254" layer="1"/>
</signal>
<signal name="SPD_IN">
<contactref element="FRONT" pad="6"/>
<contactref element="IC1" pad="25"/>
<wire x1="15.24" y1="46.99" x2="15.24" y2="45.72" width="0.254" layer="1"/>
<wire x1="15.24" y1="45.72" x2="20.32" y2="40.64" width="0.254" layer="1"/>
</signal>
<signal name="N$10">
<contactref element="R4" pad="P$2"/>
<contactref element="C7" pad="1"/>
<contactref element="MOTOR" pad="3"/>
<wire x1="53.34" y1="40.64" x2="55.88" y2="43.18" width="0.254" layer="1"/>
<wire x1="80.01" y1="43.18" x2="81.28" y2="43.18" width="0.254" layer="1"/>
<wire x1="80.01" y1="43.18" x2="77.47" y2="40.64" width="0.254" layer="1"/>
<wire x1="77.47" y1="40.64" x2="77.47" y2="33.02" width="0.254" layer="1"/>
<wire x1="77.47" y1="33.02" x2="74.93" y2="30.48" width="0.254" layer="1"/>
<wire x1="74.93" y1="30.48" x2="59.69" y2="30.48" width="0.254" layer="1"/>
<wire x1="59.69" y1="30.48" x2="55.88" y2="34.29" width="0.254" layer="1"/>
<wire x1="55.88" y1="34.29" x2="55.88" y2="43.18" width="0.254" layer="1"/>
</signal>
<signal name="CRYSTAL2">
<contactref element="Y1" pad="1"/>
<contactref element="C4" pad="1"/>
<contactref element="IC1" pad="10"/>
<wire x1="45.085" y1="28.575" x2="43.815" y2="29.845" width="0.254" layer="1"/>
<wire x1="43.815" y1="29.845" x2="35.56" y2="29.845" width="0.254" layer="1"/>
<wire x1="35.56" y1="29.845" x2="35.56" y2="33.02" width="0.254" layer="1"/>
</signal>
<signal name="CRYSTAL1">
<contactref element="Y1" pad="2"/>
<contactref element="C3" pad="1"/>
<contactref element="IC1" pad="9"/>
<wire x1="33.02" y1="29.845" x2="34.29" y2="28.575" width="0.254" layer="1"/>
<wire x1="34.29" y1="28.575" x2="40.005" y2="28.575" width="0.254" layer="1"/>
<wire x1="33.02" y1="33.02" x2="33.02" y2="29.845" width="0.254" layer="1"/>
</signal>
<signal name="N$1">
<contactref element="R3" pad="P$1"/>
<contactref element="R4" pad="P$1"/>
<contactref element="C6" pad="1"/>
<wire x1="48.26" y1="48.26" x2="50.8" y2="45.72" width="0.254" layer="1"/>
<wire x1="50.8" y1="45.72" x2="53.34" y2="48.26" width="0.254" layer="1"/>
</signal>
<signal name="VCC">
<contactref element="R2" pad="P$1"/>
<contactref element="C1" pad="2"/>
<contactref element="IC1" pad="7"/>
<contactref element="C2" pad="2"/>
<contactref element="IC1" pad="20"/>
<contactref element="DC1" pad="P3"/>
<contactref element="C9" pad="1"/>
<contactref element="FRONT" pad="1"/>
<contactref element="RAMP" pad="1"/>
<contactref element="ISP1" pad="2"/>
<wire x1="27.94" y1="33.02" x2="27.94" y2="29.845" width="0.6096" layer="1"/>
<wire x1="33.02" y1="43.18" x2="33.02" y2="40.64" width="0.6096" layer="1"/>
<contactref element="SIDE_EXP" pad="1"/>
<wire x1="3.175" y1="41.275" x2="3.175" y2="36.83" width="0.6096" layer="1"/>
<wire x1="3.175" y1="36.83" x2="3.175" y2="20.955" width="0.6096" layer="1"/>
<wire x1="7.62" y1="36.83" x2="3.175" y2="36.83" width="0.6096" layer="1"/>
<wire x1="3.175" y1="20.955" x2="5.08" y2="19.05" width="0.6096" layer="1"/>
<wire x1="5.08" y1="19.05" x2="7.62" y2="19.05" width="0.6096" layer="1"/>
<wire x1="8.89" y1="19.05" x2="7.62" y2="19.05" width="0.254" layer="1"/>
<wire x1="27.94" y1="48.26" x2="27.94" y2="46.99" width="0.6096" layer="1"/>
<wire x1="26.67" y1="49.53" x2="27.94" y2="48.26" width="0.6096" layer="1"/>
<wire x1="36.83" y1="49.53" x2="30.48" y2="49.53" width="0.6096" layer="1"/>
<wire x1="67.945" y1="52.705" x2="38.735" y2="52.705" width="0.6096" layer="1"/>
<wire x1="30.48" y1="49.53" x2="27.94" y2="46.99" width="0.6096" layer="1"/>
<wire x1="26.67" y1="49.53" x2="12.065" y2="49.53" width="0.6096" layer="1"/>
<wire x1="12.065" y1="49.53" x2="10.795" y2="48.26" width="0.6096" layer="1"/>
<wire x1="10.795" y1="48.26" x2="10.795" y2="46.355" width="0.6096" layer="1"/>
<wire x1="10.795" y1="46.355" x2="8.255" y2="43.815" width="0.6096" layer="1"/>
<wire x1="8.255" y1="43.815" x2="5.715" y2="43.815" width="0.6096" layer="1"/>
<wire x1="5.715" y1="43.815" x2="3.175" y2="41.275" width="0.6096" layer="1"/>
<wire x1="69.85" y1="46.99" x2="69.85" y2="50.8" width="0.6096" layer="1"/>
<wire x1="33.02" y1="43.18" x2="30.48" y2="45.72" width="0.6096" layer="1"/>
<wire x1="30.48" y1="45.72" x2="29.21" y2="45.72" width="0.6096" layer="1"/>
<wire x1="29.21" y1="45.72" x2="27.94" y2="46.99" width="0.6096" layer="1"/>
<wire x1="69.85" y1="50.8" x2="67.945" y2="52.705" width="0.6096" layer="1"/>
<wire x1="38.735" y1="52.705" x2="36.83" y2="50.8" width="0.6096" layer="1"/>
<wire x1="36.83" y1="50.8" x2="36.83" y2="49.53" width="0.6096" layer="1"/>
<wire x1="33.02" y1="40.64" x2="27.94" y2="35.56" width="0.6096" layer="1"/>
<wire x1="27.94" y1="35.56" x2="27.94" y2="33.02" width="0.6096" layer="1"/>
<wire x1="17.78" y1="27.305" x2="13.335" y2="27.305" width="0.254" layer="1"/>
<wire x1="13.335" y1="27.305" x2="10.795" y2="24.765" width="0.254" layer="1"/>
<wire x1="10.795" y1="24.765" x2="10.795" y2="20.955" width="0.254" layer="1"/>
<wire x1="10.795" y1="20.955" x2="8.89" y2="19.05" width="0.254" layer="1"/>
</signal>
<signal name="N$8">
<contactref element="R1" pad="P$1"/>
<contactref element="FRONT" pad="5"/>
<wire x1="24.13" y1="31.115" x2="24.13" y2="34.29" width="0.254" layer="1"/>
<wire x1="24.13" y1="34.29" x2="21.59" y2="36.83" width="0.254" layer="1"/>
<wire x1="21.59" y1="36.83" x2="21.59" y2="41.91" width="0.254" layer="1"/>
<wire x1="25.4" y1="29.845" x2="24.13" y2="31.115" width="0.254" layer="1"/>
<wire x1="21.59" y1="41.91" x2="17.78" y2="45.72" width="0.254" layer="1"/>
<wire x1="17.78" y1="45.72" x2="17.78" y2="46.99" width="0.254" layer="1"/>
</signal>
<signal name="DISP_TX">
<contactref element="R1" pad="P$2"/>
<contactref element="IC1" pad="3"/>
<wire x1="17.78" y1="33.02" x2="17.78" y2="29.845" width="0.254" layer="1"/>
</signal>
<signal name="RESET">
<contactref element="R2" pad="P$2"/>
<contactref element="IC1" pad="1"/>
<contactref element="ISP1" pad="5"/>
<wire x1="36.83" y1="39.37" x2="31.75" y2="34.29" width="0.254" layer="1"/>
<wire x1="31.75" y1="34.29" x2="31.75" y2="31.115" width="0.254" layer="1"/>
<wire x1="29.21" y1="28.575" x2="26.67" y2="28.575" width="0.254" layer="1"/>
<wire x1="26.67" y1="28.575" x2="25.4" y2="27.305" width="0.254" layer="1"/>
<wire x1="15.875" y1="28.575" x2="24.13" y2="28.575" width="0.254" layer="1"/>
<wire x1="24.13" y1="28.575" x2="25.4" y2="27.305" width="0.254" layer="1"/>
<wire x1="12.7" y1="31.75" x2="12.7" y2="33.02" width="0.254" layer="1"/>
<wire x1="41.91" y1="46.99" x2="40.64" y2="45.72" width="0.254" layer="1"/>
<wire x1="40.64" y1="45.72" x2="36.83" y2="41.91" width="0.254" layer="1"/>
<wire x1="36.83" y1="41.91" x2="36.83" y2="39.37" width="0.254" layer="1"/>
<wire x1="15.875" y1="28.575" x2="12.7" y2="31.75" width="0.254" layer="1"/>
<wire x1="29.21" y1="28.575" x2="31.75" y2="31.115" width="0.254" layer="1"/>
</signal>
<signal name="MOSI">
<contactref element="ISP1" pad="4"/>
<contactref element="IC1" pad="17"/>
<wire x1="39.37" y1="49.53" x2="40.64" y2="50.8" width="0.254" layer="1"/>
<wire x1="40.64" y1="50.8" x2="42.545" y2="50.8" width="0.254" layer="1"/>
<wire x1="42.545" y1="50.8" x2="44.45" y2="48.895" width="0.254" layer="1"/>
<wire x1="44.45" y1="48.895" x2="44.45" y2="44.45" width="0.254" layer="1"/>
<wire x1="44.45" y1="44.45" x2="40.64" y2="40.64" width="0.254" layer="1"/>
</signal>
<signal name="SCK">
<contactref element="ISP1" pad="3"/>
<contactref element="IC1" pad="19"/>
<wire x1="39.37" y1="46.99" x2="35.56" y2="43.18" width="0.254" layer="1"/>
<wire x1="35.56" y1="43.18" x2="35.56" y2="40.64" width="0.254" layer="1"/>
</signal>
<signal name="MISO">
<contactref element="ISP1" pad="1"/>
<contactref element="IC1" pad="18"/>
<wire x1="36.83" y1="46.99" x2="38.1" y2="48.26" width="0.254" layer="1"/>
<wire x1="38.1" y1="48.26" x2="42.545" y2="48.26" width="0.254" layer="1"/>
<wire x1="42.545" y1="48.26" x2="43.18" y2="47.625" width="0.254" layer="1"/>
<wire x1="38.1" y1="40.64" x2="43.18" y2="45.72" width="0.254" layer="1"/>
<wire x1="43.18" y1="45.72" x2="43.18" y2="47.625" width="0.254" layer="1"/>
</signal>
<signal name="EXP1">
<contactref element="SIDE_EXP" pad="3"/>
<contactref element="IC1" pad="27"/>
<wire x1="15.24" y1="40.64" x2="10.16" y2="35.56" width="0.254" layer="1"/>
<wire x1="4.445" y1="34.925" x2="4.445" y2="26.035" width="0.254" layer="1"/>
<wire x1="10.16" y1="35.56" x2="5.08" y2="35.56" width="0.254" layer="1"/>
<wire x1="5.08" y1="35.56" x2="4.445" y2="34.925" width="0.254" layer="1"/>
<wire x1="4.445" y1="26.035" x2="6.35" y2="24.13" width="0.254" layer="1"/>
<wire x1="6.35" y1="24.13" x2="7.62" y2="24.13" width="0.254" layer="1"/>
</signal>
<signal name="EXP2">
<contactref element="FRONT" pad="4"/>
<contactref element="IC1" pad="24"/>
<wire x1="20.32" y1="46.99" x2="20.32" y2="45.72" width="0.254" layer="1"/>
<wire x1="20.32" y1="45.72" x2="22.86" y2="43.18" width="0.254" layer="1"/>
<wire x1="22.86" y1="43.18" x2="22.86" y2="40.64" width="0.254" layer="1"/>
</signal>
<signal name="EXP3">
<contactref element="FRONT" pad="3"/>
<contactref element="IC1" pad="23"/>
<wire x1="22.86" y1="46.99" x2="22.86" y2="45.72" width="0.254" layer="1"/>
<wire x1="22.86" y1="45.72" x2="25.4" y2="43.18" width="0.254" layer="1"/>
<wire x1="25.4" y1="43.18" x2="25.4" y2="40.64" width="0.254" layer="1"/>
</signal>
<signal name="N$9" class="1">
<contactref element="Q2" pad="P3"/>
<contactref element="Q3" pad="P3"/>
<contactref element="D3" pad="C"/>
<wire x1="63.5" y1="21.462503125" x2="63.5" y2="16.51" width="1.778" layer="1"/>
<wire x1="63.5" y1="16.51" x2="59.69" y2="12.7" width="1.778" layer="1"/>
<wire x1="59.69" y1="12.7" x2="55.88" y2="12.7" width="1.778" layer="1"/>
<wire x1="55.88" y1="12.7" x2="54.61" y2="11.43" width="1.778" layer="1"/>
<wire x1="54.61" y1="11.43" x2="54.61" y2="10.16" width="1.778" layer="1"/>
<wire x1="50.8" y1="8.89" x2="53.34" y2="8.89" width="1.778" layer="1"/>
<wire x1="53.34" y1="8.89" x2="54.61" y2="10.16" width="1.778" layer="1"/>
<contactref element="C10" pad="1"/>
<contactref element="D4" pad="C"/>
<wire x1="63.5" y1="21.462503125" x2="62.23" y2="22.86" width="0.6096" layer="1"/>
<wire x1="62.23" y1="22.86" x2="62.23" y2="24.765" width="0.6096" layer="1"/>
<wire x1="62.23" y1="24.765" x2="64.77" y2="27.305" width="0.6096" layer="1"/>
</signal>
<signal name="N$11">
<contactref element="R7" pad="P$2"/>
<contactref element="Q3" pad="P1"/>
<contactref element="C10" pad="2"/>
<contactref element="D4" pad="A"/>
<wire x1="67.31" y1="27.305" x2="69.85" y2="24.765" width="0.254" layer="1"/>
<wire x1="69.85" y1="24.765" x2="68.58" y2="23.495" width="0.254" layer="1"/>
<wire x1="68.58" y1="23.495" x2="68.58" y2="21.462503125" width="0.254" layer="1"/>
<wire x1="67.31" y1="27.305" x2="66.04" y2="28.575" width="0.254" layer="1"/>
<wire x1="66.04" y1="28.575" x2="63.5" y2="28.575" width="0.254" layer="1"/>
<wire x1="63.5" y1="28.575" x2="62.23" y2="27.305" width="0.254" layer="1"/>
</signal>
</signals>
<mfgpreviewcolors>
<mfgpreviewcolor name="soldermaskcolor" color="0xC8008000"/>
<mfgpreviewcolor name="silkscreencolor" color="0xFFFEFEFE"/>
<mfgpreviewcolor name="backgroundcolor" color="0xFF282828"/>
<mfgpreviewcolor name="coppercolor" color="0xFFFFBF00"/>
<mfgpreviewcolor name="substratecolor" color="0xFF786E46"/>
</mfgpreviewcolors>
<errors>
<approved hash="18,29,48fd26ee80d7eec4"/>
</errors>
</board>
</drawing>
<compatibility>
<note version="6.3" minversion="6.2.2" severity="warning">
Since Version 6.2.2 text objects can contain more than one line,
which will not be processed correctly with this version.
</note>
</compatibility>
</eagle>


text:
@book{bib01,
  title={历代书法论文选},
  author={上海书画出版社},
  publisher={上海书画出版社},
  year={1979},
}

@article{bib02,
  title={科学技术报告、学位论文和学术论文的编写格式},
  author={YoviSun.COM, yovisunqq.com},
  journal={郑州航空工业管理学院学报},
  number={2},
  pages={55-56},
  year={1991},
}

repository: ZhengPeterWang/distributed

license_type: permissive

repo_name: ZhengPeterWang/distributed

branch_name: refs/heads/master

extension: bib


text:
package jz

// 输入一个整数，输出该数二进制表示中 1 的个数。
func NumberOf1(n int) int {
	count := 0
	for n > 1 {
		if n&1 == 1 {
			// the lowest bit is 1
			count++
		}

		n >>= 1 // move all bits to right
	}

	if n == 1 {
		count++
	}

	return count
}

license: MIT

extension: go


text:
package model

import (
	"fmt"
	"io"
	"strings"
)

// script associates a list of CommandBlocks with the name of the
// file they came from.
type Script struct {
	fileName FileName
	blocks   []*CommandBlock
}

const (
	TmplNameScript = "script"
	TmplBodyScript = `
{{define "` + TmplNameScript + `"}}

mdrip {{.FileName}}

{{range $i, $b := .Blocks}}

  {{ template "` + tmplNameCommandBlock + `" $b }}

{{end}}
{{end}}
`
)

func NewScript(fileName FileName, blocks []*CommandBlock) *Script {
	return &Script{fileName, blocks}
}

func (s Script) FileName() FileName {
	return s.fileName
}

func (s Script) Blocks() []*CommandBlock {
	return s.blocks
}

// Print sends contents to the given Writer.
//
// If n <= 0, print everything, else only print the first n blocks.
//
// n is a count not an index, so to print only the first two blocks,
// pass n==2, not n==1.
func (s Script) Print(w io.Writer, label Label, n int) {
	fmt.Fprintf(w, "#\n# Script @%s from %s \n#\n", label, s.FileName())
	delimFmt := "#" + strings.Repeat("-", 70) + "#  %s %d of %d\n"
	blockCount := len(s.blocks)
	for i, block := range s.blocks {
		if n > 0 && i >= n {
			break
		}
		fmt.Fprintf(w, delimFmt, "Start", i+1, blockCount)
		block.Print(w, "#", i+1, label, s.FileName())
		fmt.Fprintf(w, delimFmt, "End", i+1, blockCount)
		fmt.Fprintln(w)
	}
}

repository: dougbeal/mdrip

repo_name: dougbeal/mdrip


text:
package metaresource

import (
	"bufio"
	"encoding/json"
	"os"
	"sort"
	"sync"

	"github.com/giantswarm/microerror"
	"k8s.io/apiserver/pkg/apis/audit"
)

type MetaResource struct {
	Kind      string
	Name      string
	Namespace string
	APIGroup  string
	Events    []audit.Event
}

func (m *MetaResource) FindEvents(f string, storeCh chan<- audit.Event, errCh chan<- error, wg *sync.WaitGroup) {
	defer wg.Done()

	file, err := os.Open(f)
	if err != nil {
		errCh <- microerror.Mask(err)
	}
	defer file.Close()

	var event audit.Event

	scanner := bufio.NewScanner(file)
	for scanner.Scan() {
		err := json.Unmarshal(scanner.Bytes(), &event)
		if err != nil {
			errCh <- microerror.Mask(err)
		}

		if isResponseComplete(event.Stage) && isMutatingOperation(event.Verb) && m.isTargetResource(event) {
			storeCh <- *event.DeepCopy()
		}
	}
}

func (m *MetaResource) StoreEvent(event audit.Event) {
	m.Events = append(m.Events, event)
}

func (m *MetaResource) SortEvents() {
	sort.Slice(m.Events, func(i, j int) bool {
		return m.Events[i].StageTimestamp.Time.Before(m.Events[j].StageTimestamp.Time)
	})
}

func (m *MetaResource) isTargetResource(event audit.Event) bool {
	return event.ObjectRef.Resource == m.Kind &&
		event.ObjectRef.Name == m.Name &&
		event.ObjectRef.Namespace == m.Namespace &&
		event.ObjectRef.APIGroup == m.APIGroup
}

func isMutatingOperation(op string) bool {
	mutatingOperations := []string{"update", "create", "delete", "patch"}

	for _, s := range mutatingOperations {
		if s == op {
			return true
		}
	}

	return false
}

func isResponseComplete(stage audit.Stage) bool {
	return stage == audit.StageResponseComplete
}

branch_name: refs/heads/main

gha_language: Go


text:
require xorg-lib-common.inc

DESCRIPTION = "X Render extension library."
LICENSE = "BSD-X"

DEPENDS += " virtual/libx11 renderproto"

XORG_PN = "libXrender"

extension: bb


text:
# Copyright (C) 2020 iWave Systems Technologies

require recipes-kernel/linux/linux-imx_5.4.bb

SRC_URI = "git://git-codecommit.ap-south-1.amazonaws.com/v1/repos/linux-imx-iWave.git;protocol=ssh;branch=main"
SRCREV = "f79cfd4f8446501ccd4ba602eb3863caa4474cc2"

do_copy_defconfig () {
    install -d ${B}
    mkdir -p ${B}
    # copy latest imx8mq_iwg33m_defconfig to use for iwg33m
    cp ${S}/arch/arm64/configs/iwg33m_defconfig ${B}/.config
    cp ${S}/arch/arm64/configs/iwg33m_defconfig ${B}/../defconfig
}

do_compile_append () {
	for dtbf in ${KERNEL_DEVICETREE}; do
		dtb=`normalize_dtb "$dtbf"`
		oe_runmake DTC_FLAGS="-@" $dtb
	done
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaffyScript.Collections;

namespace TaffyScript
{
    /// <summary>
    /// Variant representing a TaffyScript value
    /// </summary>
    public struct TsObject
    {
        #region Constants

        public const float All = -3f;
        public const float Noone = -4f;

        #endregion

        #region Properties

        public VariableType Type { get; private set; }
        public ITsValue Value { get; private set; }

        #endregion

        #region Constructors

        private TsObject(VariableType type, ITsValue value)
        {
            Type = type;
            Value = value;
        }

        /// <summary>
        /// Creates a TaffyScript object from a bool.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(bool value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value ? 1 : 0);
        }

        /// <summary>
        /// Creates a string TaffyScript object from a char.
        /// </summary>
        /// <param name="value"></param>
        public TsObject(char value)
        {
            Type = VariableType.String;
            Value = new TsImmutableValue<string>(value.ToString());
        }

        /// <summary>
        /// Creates a TaffyScript object from a byte.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(byte value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from an sbyte.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(sbyte value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from a short.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(short value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from a ushort.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(ushort value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from an int.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(int value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from a uint.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(uint value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from a long.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(long value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from a ulong.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(ulong value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from a float.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(float value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from a double.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(double value)
        {
            Type = VariableType.Real;
            Value = new TsImmutableValue<float>((float)value);
        }

        /// <summary>
        /// Creates a TaffyScript object from a string.
        /// </summary>
        /// <param name="value">The value of the object.</param>
        public TsObject(string value)
        {
            Type = VariableType.String;
            Value = new TsImmutableValue<string>(value);
        }

        /// <summary>
        /// Creates a TaffyScript object from an instances id.
        /// </summary>
        /// <param name="instance">The instance to get the id from.</param>
        public TsObject(ITsInstance instance)
        {
            Type = VariableType.Instance;
            Value = new TsImmutableValue<ITsInstance>(instance);
        }

        /// <summary>
        /// Creates a TaffyScript object from a 1D array.
        /// </summary>
        /// <param name="array">The value of the object.</param>
        public TsObject(TsObject[] array)
        {
            Type = VariableType.Array1;
            Value = new TsMutableValue<TsObject[]>(array);
        }

        /// <summary>
        /// Creates a TaffyScript object from a 2D array.
        /// </summary>
        /// <param name="array">The value of the object.</param>
        public TsObject(TsObject[][] array)
        {
            Type = VariableType.Array2;
            Value = new TsMutableValue<TsObject[][]>(array);
        }

        /// <summary>
        /// Creates a TaffyScript object from a <see cref="TsDelegate"/>.
        /// </summary>
        /// <param name="script">The value of the object.</param>
        public TsObject(TsDelegate script)
        {
            Type = VariableType.Delegate;
            Value = new TsImmutableValue<TsDelegate>(script);
        }

        /// <summary>
        /// Creates an empty TaffyScript object.
        /// </summary>
        public static TsObject Empty()
        {
            return new TsObject(VariableType.Null, new TsImmutableValue<object>(null));
        }

        public static TsObject NooneObject()
        {
            return new TsObject(Noone);
        }

        #endregion

        #region Raw Values

        /// <summary>
        /// Gets the value of this object as a bool.
        /// </summary>
        /// <returns></returns>
        public bool GetBool()
        {
            return GetFloat() > 0f;
        }

        /// <summary>
        /// Gets the value of this object as a char.
        /// </summary>
        /// <returns></returns>
        public char GetChar()
        {
            return GetString()[0];
        }

        /// <summary>
        /// Gets the value of this object as a byte.
        /// </summary>
        /// <returns></returns>
        public byte GetByte()
        {
            return (byte)GetFloat();
        }

        /// <summary>
        /// Gets the value of this object as an sbyte.
        /// </summary>
        /// <returns></returns>
        public sbyte GetSByte()
        {
            return (sbyte)GetFloat();
        }

        /// <summary>
        /// Gets the value of this object as a short.
        /// </summary>
        /// <returns></returns>
        public short GetShort()
        {
            return (short)GetFloat();
        }

        /// <summary>
        /// Gets the value of this object as a ushort.
        /// </summary>
        /// <returns></returns>
        public ushort GetUShort()
        {
            return (ushort)GetFloat();
        }

        /// <summary>
        /// Gets the number value held by this object as an int.
        /// </summary>
        public int GetInt()
        {
            return (int)GetFloat();
        }

        /// <summary>
        /// Gets the value of this object as a uint.
        /// </summary>
        /// <returns></returns>
        public uint GetUInt()
        {
            return (uint)GetFloat();
        }

        /// <summary>
        /// Gets the number value held by this object as a long.
        /// </summary>
        /// <returns></returns>
        public long GetLong()
        {
            return (long)GetFloat();
        }

        /// <summary>
        /// Gets the value of this object as a ulong.
        /// </summary>
        /// <returns></returns>
        public ulong GetULong()
        {
            return (ulong)GetFloat();
        }

        /// <summary>
        /// Gets the number value held by this object.
        /// </summary>
        /// <returns></returns>
        public float GetFloat()
        {
            if (Type == VariableType.Null)
                return 0;
            if (Type != VariableType.Real)
                throw new InvalidTsTypeException($"Variable is supposed to be of type Real, is {Type} instead.");
            return ((TsImmutableValue<float>)Value).StrongValue;
        }

        /// <summary>
        /// Gets the value of this object as a double.
        /// </summary>
        /// <returns></returns>
        public double GetDouble()
        {
            return GetFloat();
        }

        /// <summary>
        /// Gets the number held by this object without checking it's type.
        /// </summary>
        /// <returns></returns>
        public float GetFloatUnchecked()
        {
            return ((TsImmutableValue<float>)Value).StrongValue;
        }

        /// <summary>
        /// Gets the string value held by this object.
        /// </summary>
        /// <returns></returns>
        public string GetString()
        {
            if (Type == VariableType.Null)
                return "";
            if (Type != VariableType.String)
                throw new InvalidTsTypeException($"Variable is supposed to be of type String, is {Type} instead.");
            return ((TsImmutableValue<string>)Value).StrongValue;
        }

        /// <summary>
        /// Gets the string value held by this object without checking its type.
        /// </summary>
        /// <returns></returns>
        public string GetStringUnchecked()
        {
            return ((TsImmutableValue<string>)Value).StrongValue;
        }

        /// <summary>
        /// Gets the instance held by this object.
        /// </summary>
        /// <returns></returns>
        public ITsInstance GetInstance()
        {
            if (Type != VariableType.Instance)
                throw new InvalidTsTypeException($"Variable is supposed to be of type Instance, is {Type} instead.");

            return (ITsInstance)Value.WeakValue;
        }

        /// <summary>
        /// Gets the instance held by this object without checking its type.
        /// </summary>
        /// <returns></returns>
        public ITsInstance GetInstanceUnchecked()
        {
            return (ITsInstance)Value.WeakValue;
        }

        /// <summary>
        /// Gets the 1D array held by this object.
        /// </summary>
        /// <returns></returns>
        public TsObject[] GetArray1D()
        {
            if (Type != VariableType.Array1)
                throw new InvalidTsTypeException($"Variable is supposed to be of type Array1D, is {Type} instead.");
            return ((TsMutableValue<TsObject[]>)Value).StrongValue;
        }

        /// <summary>
        /// Gets the 2D array held by this object.
        /// </summary>
        /// <returns></returns>
        public TsObject[][] GetArray2D()
        {
            if (Type != VariableType.Array2)
                throw new InvalidTsTypeException($"Variable is supposed to be of type Array2D, is {Type} instead.");
            return ((TsMutableValue<TsObject[][]>)Value).StrongValue;
        }

        /// <summary>
        /// Gets the delegate held by this object.
        /// </summary>
        /// <returns></returns>
        public TsDelegate GetDelegate()
        {
            if (Type != VariableType.Delegate)
                throw new InvalidTsTypeException($"Variable is supposed to be of type Delegate, is {Type} instead.");
            return (TsDelegate)Value.WeakValue;
        }

        /// <summary>
        /// Gets the delegate held by this object without checking its type.
        /// </summary>
        /// <returns></returns>
        public TsDelegate GetDelegateUnchecked()
        {
            return (TsDelegate)Value.WeakValue;
        }

        /// <summary>
        /// Gets the untyped value held by this object.
        /// </summary>
        /// <returns></returns>
        public object GetValue()
        {
            if (Value == null)
                return null;
            return Value.WeakValue;
        }

        #endregion

        #region Member Access

        /// <summary>
        /// Sets a variable of the given name on the instance with an id that matches the value of this object to a float value.
        /// </summary>
        /// <param name="name">The name of the variable.</param>
        /// <param name="value">The value of the variable.</param>
        public void MemberSet(string name, float value)
        {
            GetInstance()[name] = value;
        }

        /// <summary>
        /// Sets a variable of the given name on the instance with an id that matches the value of this object to a string value.
        /// </summary>
        /// <param name="name">The name of the variable.</param>
        /// <param name="value">The value of the variable.</param>
        public void MemberSet(string name, string value)
        {
            GetInstance()[name] = value;
        }

        /// <summary>
        /// Sets a variable of the given name on the instance with an id that matches the value of this object.
        /// </summary>
        /// <param name="name">The name of the variable.</param>
        /// <param name="value">The value of the variable.</param>
        public void MemberSet(string name, TsObject value)
        {
            GetInstance()[name] = value;
        }

        /// <summary>
        /// Gets the value of a variable with the given name from the instance with an id that matches the value of this object.
        /// </summary>
        /// <param name="name">The name of the variable.</param>
        /// <returns></returns>
        public TsObject MemberGet(string name)
        {
            return GetInstance()[name];
        }

        #endregion

        #region Array Access

        /// <summary>
        /// Sets the value at the given index in the 1D array held by this object.
        /// </summary>
        /// <param name="index">The array index.</param>
        /// <param name="right">The value of the index.</param>
        public void ArraySet(TsObject index, TsObject right)
            => ArraySet((int)index, right);

        /// <summary>
        /// Sets the value at the given index in the 1D array held by this object.
        /// </summary>
        /// <param name="index">The array index.</param>
        /// <param name="right">The value of the index.</param>
        public void ArraySet(int index, TsObject right)
        {
            if (index < 0)
                throw new ArgumentOutOfRangeException("index");

            if (Type != VariableType.Array1)
            {
                Type = VariableType.Array1;
                var temp = new TsObject[index + 1];
                temp[index] = right;
                Value = new TsMutableValue<TsObject[]>(temp);
                return;
            }
            var self = (TsMutableValue<TsObject[]>)Value;
            var arr = self.StrongValue;
            if (index >= arr.Length)
            {
                var temp = new TsObject[index + 1];
                Array.Copy(arr, 0, temp, 0, arr.Length);
                arr = temp;
                self.StrongValue = temp;
            }
            arr[index] = right;
        }

        /// <summary>
        /// Sets the value at the given indeces in the 2D array held by this object.
        /// </summary>
        /// <param name="index1">The index of the first dimension.</param>
        /// <param name="index2">The index of the second dimension.</param>
        /// <param name="right">The value of the index.</param>
        public void ArraySet(TsObject index1, TsObject index2, TsObject right)
            => ArraySet((int)index1, (int)index2, right);

        /// <summary>
        /// Sets the value at the given indeces in the 2D array held by this object.
        /// </summary>
        /// <param name="index1">The index of the first dimension.</param>
        /// <param name="index2">The index of the second dimension.</param>
        /// <param name="right">The value of the index.</param>
        public void ArraySet(int index1, TsObject index2, TsObject right)
            => ArraySet(index1, (int)index2, right);

        /// <summary>
        /// Sets the value at the given indeces in the 2D array held by this object.
        /// </summary>
        /// <param name="index1">The index of the first dimension.</param>
        /// <param name="index2">The index of the second dimension.</param>
        /// <param name="right">The value of the index.</param>
        public void ArraySet(TsObject index1, int index2, TsObject right)
            => ArraySet((int)index1, index2, right);

        /// <summary>
        /// Sets the value at the given indeces in the 2D array held by this object.
        /// </summary>
        /// <param name="index1">The index of the first dimension.</param>
        /// <param name="index2">The index of the second dimension.</param>
        /// <param name="right">The value of the index.</param>
        public void ArraySet(int index1, int index2, TsObject right)
        {
            if (index1 < 0 || index2 < 0)
                throw new ArgumentOutOfRangeException($"{(index1 < 0 ? nameof(index1) : nameof(index2))}");

            if (Type != VariableType.Array2)
            {
                Type = VariableType.Array2;
                var temp = new TsObject[index1 + 1][];
                var inner = new TsObject[index2 + 1];
                inner[index2] = right;
                temp[index1] = inner;
                Value = new TsMutableValue<TsObject[][]>(temp);
                return;
            }

            var self = (TsMutableValue<TsObject[][]>)Value;
            if(index1 >= self.StrongValue.Length)
            {
                var temp = new TsObject[index1 + 1][];
                Array.Copy(self.StrongValue, 0, temp, 0, self.StrongValue.Length);
                self.StrongValue = temp;
            }
            if (self.StrongValue[index1] == null)
                self.StrongValue[index1] = new TsObject[index2 + 1];
            else if(index2 >= self.StrongValue[index1].Length)
            {
                var temp = new TsObject[index2 + 1];
                Array.Copy(self.StrongValue[index1], 0, temp, 0, self.StrongValue[index1].Length);
                self.StrongValue[index1] = temp;
            }
            self.StrongValue[index1][index2] = right;
        }

        /// <summary>
        /// Gets the value at the given index in the 1D array held by this object.
        /// </summary>
        /// <param name="index">The index of the value.</param>
        /// <returns></returns>
        public TsObject ArrayGet(TsObject index)
            => ArrayGet((int)index);

        /// <summary>
        /// Gets the value at the given index in the 1D array held by this object.
        /// </summary>
        /// <param name="index">The index of the value.</param>
        /// <returns></returns>
        public TsObject ArrayGet(int index)
        {
            return GetArray1D()[index];
        }

        /// <summary>
        /// Gets the value at the given indeces in the 2D array held by this object.
        /// </summary>
        /// <param name="index1">The index of the first dimension.</param>
        /// <param name="index2">The index of the second dimension.</param>
        /// <returns></returns>
        public TsObject ArrayGet(TsObject index1, TsObject index2)
            => ArrayGet((int)index1, (int)index2);

        /// <summary>
        /// Gets the value at the given indeces in the 2D array held by this object.
        /// </summary>
        /// <param name="index1">The index of the first dimension.</param>
        /// <param name="index2">The index of the second dimension.</param>
        /// <returns></returns>
        public TsObject ArrayGet(TsObject index1, int index2)
            => ArrayGet((int)index1, index2);

        /// <summary>
        /// Gets the value at the given indeces in the 2D array held by this object.
        /// </summary>
        /// <param name="index1">The index of the first dimension.</param>
        /// <param name="index2">The index of the second dimension.</param>
        /// <returns></returns>
        public TsObject ArrayGet(int index1, TsObject index2)
            => ArrayGet(index1, (int)index2);

        /// <summary>
        /// Gets the value at the given indeces in the 2D array held by this object.
        /// </summary>
        /// <param name="index1">The index of the first dimension.</param>
        /// <param name="index2">The index of the second dimension.</param>
        /// <returns></returns>
        public TsObject ArrayGet(int index1, int index2)
        {
            return GetArray2D()[index1][index2];
        }

        #endregion

        #region Delegate Access

        public TsObject DelegateInvoke(params TsObject[] args)
        {
            return GetDelegate().Invoke(args);
        }

        public TsObject DelegateInvoke(ITsInstance target, params TsObject[] args)
        {
            return GetDelegate().Invoke(target, args);
        }

        #endregion

        #region Object Overrides

        /// <summary>
        /// Gets the hash code of the underlying value.
        /// </summary>
        /// <returns></returns>
        public override int GetHashCode()
        {
            if (Type == VariableType.Null)
                return 0;
            return GetValue().GetHashCode();
        }

        /// <summary>
        /// Converts the held value to a string.
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            switch(Type)
            {
                case VariableType.Array1:
                    var builder = new StringBuilder();
                    ArrayToString(builder, (TsObject[])Value.WeakValue);
                    return builder.ToString();
                case VariableType.Array2:
                    builder = new StringBuilder();
                    var outer = (TsObject[][])Value.WeakValue;
                    builder.Append("[");
                    if(outer.Length == 0)
                        builder.Append(",]");
                    else
                    {
                        ArrayToString(builder, outer[0]);
                        for(var i = 1; i < outer.Length; i++)
                        {
                            builder.Append(", ");
                            ArrayToString(builder, outer[i]);
                        }
                        builder.Append("]");
                    }
                    return builder.ToString();
                case VariableType.Null:
                    return "null";
                default:
                    return GetValue().ToString();
            }
        }

        private void ArrayToString(StringBuilder builder, TsObject[] array)
        {
            builder.Append("[");
            if(array.Length != 0)
            {
                builder.Append(array[0].ToString());
                for(var i = 1; i < array.Length; i++)
                {
                    builder.Append(", ");
                    builder.Append(array[i].ToString());
                }
            }
            builder.Append("]");
        }

        /// <summary>
        /// Determines if the held value is equal to an object.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            if (obj is TsObject other)
                return this == other;

            var held = Value.WeakValue;
            if (held is null)
                return obj is null;

            return held.Equals(obj);
        }

        #endregion

        #region Operators

#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

        public static explicit operator bool(TsObject right)
        {
            return right.GetBool();
        }

        public static explicit operator char(TsObject right)
        {
            return right.GetChar();
        }

        public static explicit operator byte(TsObject right)
        {
            return right.GetByte();
        }

        public static explicit operator sbyte(TsObject right)
        {
            return right.GetSByte();
        }

        public static explicit operator short(TsObject right)
        {
            return right.GetShort();
        }

        public static explicit operator ushort(TsObject right)
        {
            return right.GetUShort();
        }

        public static explicit operator int(TsObject right)
        {
            return right.GetInt();
        }

        public static explicit operator uint(TsObject right)
        {
            return right.GetUInt();
        }

        public static explicit operator long(TsObject right)
        {
            return right.GetLong();
        }

        public static explicit operator ulong(TsObject right)
        {
            return right.GetULong();
        }

        public static explicit operator float(TsObject right)
        {
            return right.GetFloat();
        }

        public static explicit operator double(TsObject right)
        {
            return right.GetFloat();
        }

        public static explicit operator string(TsObject right)
        {
            return right.GetString();
        }

        public static explicit operator TsInstance(TsObject right)
        {
            return (TsInstance)right.GetInstance();
        }

        public static explicit operator TsDelegate(TsObject right)
        {
            return right.GetDelegate();
        }

        public static explicit operator TsObject[](TsObject right)
        {
            return right.GetArray1D();
        }

        public static explicit operator TsObject[][](TsObject right)
        {
            return right.GetArray2D();
        }

        public static implicit operator TsObject(bool right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(char right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(byte right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(sbyte right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(short right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(ushort right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(int right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(uint right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(long right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(ulong right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(float right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(double right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(string right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(TsInstance right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(TsDelegate right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(TsObject[] right)
        {
            return new TsObject(right);
        }

        public static implicit operator TsObject(TsObject[][] right)
        {
            return new TsObject(right);
        }

        public static TsObject operator +(TsObject obj)
        {
            return new TsObject(+obj.GetFloat());
        }

        public static TsObject operator -(TsObject obj)
        {
            return new TsObject(-obj.GetFloat());
        }

        public static TsObject operator !(TsObject obj)
        {
            return new TsObject(!obj.GetBool());
        }

        public static TsObject operator ~(TsObject obj)
        {
            return new TsObject(~(int)obj.GetFloat());
        }

        public static TsObject operator ++(TsObject obj)
        {
            return new TsObject(obj.GetFloat() + 1f);
        }

        public static TsObject operator --(TsObject obj)
        {
            return new TsObject(obj.GetFloat() - 1f);
        }

        public static bool operator true(TsObject obj) => obj.GetBool();

        public static bool operator false(TsObject obj) => !obj.GetBool();

        public static TsObject operator +(TsObject left, TsObject right)
        {
            if (left.Type == right.Type)
            {
                if (left.Type == VariableType.Real)
                    return new TsObject(left.GetFloat() + right.GetFloat());
                else if (left.Type == VariableType.String)
                    return new TsObject(left.GetString() + right.GetString());
            }
            throw new InvalidOperationException($"Cannot add {left.Type} and {right.Type} together.");
        }

        public static TsObject operator +(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot add {left.Type} and Real together.");
            return new TsObject(left.GetFloat() + right);
        }

        public static TsObject operator +(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot add Real and {right.Type} together.");
            return new TsObject(left + right.GetFloat());
        }

        public static TsObject operator +(TsObject left, string right)
        {
            if (left.Type != VariableType.String)
                throw new InvalidOperationException($"Cannot add {left.Type} and String together.");
            return new TsObject(left.GetString() + right);
        }

        public static TsObject operator +(string left, TsObject right)
        {
            if (right.Type != VariableType.String)
                throw new InvalidOperationException($"Cannot add String and {right.Type} together.");
            return new TsObject(left + right.GetString());
        }

        public static TsObject operator -(TsObject left, TsObject right)
        {
            if (left.Type == VariableType.Real && right.Type == VariableType.Real)
                return new TsObject(left.GetFloat() - right.GetFloat());
            throw new InvalidOperationException($"Cannot subtract {left.Type} and {right.Type}.");
        }

        public static TsObject operator -(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot subtract {left.Type} and Real together.");
            return new TsObject(left.GetFloat() - right);
        }

        public static TsObject operator -(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot subtract Real and {right.Type} together.");
            return new TsObject(left - right.GetFloat());
        }

        public static TsObject operator *(TsObject left, TsObject right)
        {
            if (left.Type == VariableType.Real && right.Type == VariableType.Real)
                return new TsObject(left.GetFloat() * right.GetFloat());
            throw new InvalidOperationException($"Cannot multiply {left.Type} and {right.Type}.");
        }

        public static TsObject operator *(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot multiply {left.Type} and Real together.");
            return new TsObject(left.GetFloat() * right);
        }

        public static TsObject operator *(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot multiply Real and {right.Type} together.");
            return new TsObject(left * right.GetFloat());
        }

        public static TsObject operator /(TsObject left, TsObject right)
        {
            if (left.Type == VariableType.Real && right.Type == VariableType.Real)
                return new TsObject(left.GetFloat() / right.GetFloat());
            throw new InvalidOperationException($"Cannot divide {left.Type} and {right.Type}.");
        }

        public static TsObject operator /(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot divide {left.Type} and Real together.");
            return new TsObject(left.GetFloat() / right);
        }

        public static TsObject operator /(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot divide Real and {right.Type} together.");
            return new TsObject(left / right.GetFloat());
        }

        public static TsObject operator %(TsObject left, TsObject right)
        {
            if (left.Type == VariableType.Real && right.Type == VariableType.Real)
                return new TsObject(left.GetFloat() % right.GetFloat());
            throw new InvalidOperationException($"Cannot modulo {left.Type} and {right.Type}.");
        }

        public static TsObject operator %(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot modulo {left.Type} and Real together.");
            return new TsObject(left.GetFloat() % right);
        }

        public static TsObject operator %(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot modulo Real and {right.Type} together.");
            return new TsObject(left % right.GetFloat());
        }

        public static TsObject operator &(TsObject left, TsObject right)
        {
            if (left.Type != VariableType.Real || right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot & {left.Type} and {right.Type}.");
            return new TsObject(Convert.ToInt32(left.GetFloat()) & Convert.ToInt32(right.GetFloat()));
        }

        public static TsObject operator &(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot & {left.Type} and Real together.");
            return new TsObject(Convert.ToInt32(left.GetFloat()) & Convert.ToInt32(right));
        }

        public static TsObject operator &(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot & Real and {right.Type} together.");
            return new TsObject(Convert.ToInt32(left) & Convert.ToInt32(right.GetFloat()));
        }

        public static TsObject operator |(TsObject left, TsObject right)
        {
            if (left.Type != VariableType.Real || right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot | {left.Type} and {right.Type}.");
            return new TsObject(Convert.ToInt32(left.GetFloat()) | Convert.ToInt32(right.GetFloat()));
        }

        public static TsObject operator |(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot | {left.Type} and Real together.");
            return new TsObject(Convert.ToInt32(left.GetFloat()) | Convert.ToInt32(right));
        }

        public static TsObject operator |(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot | Real and {right.Type} together.");
            return new TsObject(Convert.ToInt32(left) | Convert.ToInt32(right.GetFloat()));
        }

        public static TsObject operator ^(TsObject left, TsObject right)
        {
            if (left.Type != VariableType.Real || right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot ^ {left.Type} and {right.Type}.");
            return new TsObject(Convert.ToInt32(left.GetFloat()) ^ Convert.ToInt32(right.GetFloat()));
        }

        public static TsObject operator ^(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot ^ {left.Type} and Real together.");
            return new TsObject(Convert.ToInt32(left.GetFloat()) ^ Convert.ToInt32(right));
        }

        public static TsObject operator ^(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot ^ Real and {right.Type} together.");
            return new TsObject(Convert.ToInt32(left) ^ Convert.ToInt32(right.GetFloat()));
        }

        public static TsObject operator <<(TsObject left, int right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot & {left.Type} and Real together.");
            return new TsObject(Convert.ToInt32(left.GetFloat()) << right);
        }

        public static TsObject operator >>(TsObject left, int right)
        {
            if (left.Type != VariableType.Real)
                throw new InvalidOperationException($"Cannot & {left.Type} and Real together.");
            return new TsObject(Convert.ToInt32(left.GetFloat()) >> right);
        }

        public static bool operator ==(TsObject left, TsObject right)
        {
            if (left.Type != right.Type)
                return false;
            switch (left.Type)
            {
                case VariableType.Real:
                    return left.GetFloatUnchecked() == right.GetFloatUnchecked();
                case VariableType.String:
                    return left.GetStringUnchecked() == right.GetStringUnchecked();
                case VariableType.Array1:
                case VariableType.Array2:
                default:
                    return left.GetValue() == right.GetValue();
            }
        }

        public static bool operator ==(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                return false;

            return left.GetFloatUnchecked() == right;
        }

        public static bool operator ==(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                return false;

            return right.GetFloatUnchecked() == left;
        }

        public static bool operator ==(TsObject left, string right)
        {
            if (left.Type != VariableType.String)
                return false;

            return left.GetStringUnchecked() == right;
        }

        public static bool operator ==(string left, TsObject right)
        {
            if (right.Type != VariableType.String)
                return false;

            return right.GetStringUnchecked() == left;
        }

        public static bool operator !=(TsObject left, TsObject right)
        {
            if (left.Type != right.Type)
                return true;
            switch (left.Type)
            {
                case VariableType.Real:
                    return left.GetFloatUnchecked() != right.GetFloatUnchecked();
                case VariableType.String:
                    return left.GetStringUnchecked() != right.GetStringUnchecked();
                case VariableType.Array1:
                case VariableType.Array2:
                default:
                    return left.GetValue() != right.GetValue();
            }
        }

        public static bool operator !=(TsObject left, float right)
        {
            if (left.Type != VariableType.Real)
                return true;

            return left.GetFloatUnchecked() != right;
        }

        public static bool operator !=(float left, TsObject right)
        {
            if (right.Type != VariableType.Real)
                return true;

            return right.GetFloatUnchecked() != left;
        }

        public static bool operator !=(TsObject left, string right)
        {
            if (left.Type != VariableType.String)
                return true;

            return left.GetStringUnchecked() != right;
        }

        public static bool operator !=(string left, TsObject right)
        {
            if (right.Type != VariableType.String)
                return true;

            return right.GetStringUnchecked() != left;
        }

        public static bool operator <(TsObject left, TsObject right)
        {
            if (left.Type == VariableType.Real)
            {
                if (right.Type == VariableType.Real)
                    return left.GetFloatUnchecked() < right.GetFloatUnchecked();
                else
                    return left.GetFloatUnchecked() < right.GetHashCode();
            }
            else if (right.Type == VariableType.Real)
                return left.GetHashCode() < right.GetFloatUnchecked();
            else
                return left.GetHashCode() < right.GetHashCode();
        }

        public static bool operator <(TsObject left, float right)
        {
            if (left.Type == VariableType.Real)
                return left.GetFloatUnchecked() < right;
            return left.GetHashCode() < right;
        }

        public static bool operator <(float left, TsObject right)
        {
            if (right.Type == VariableType.Real)
                return left < right.GetFloatUnchecked();
            return left < right.GetHashCode();
        }

        public static bool operator <(TsObject left, string right)
        {
            if (left.Type == VariableType.Real)
                return left.GetFloatUnchecked() < right.GetHashCode();
            return left.GetHashCode() < right.GetHashCode();
        }

        public static bool operator <(string left, TsObject right)
        {
            if (right.Type == VariableType.Real)
                return left.GetHashCode() < right.GetFloatUnchecked();
            return left.GetHashCode() < right.GetHashCode();
        }

        public static bool operator >(TsObject left, TsObject right)
        {
            if (left.Type == VariableType.Real)
            {
                if (right.Type == VariableType.Real)
                    return left.GetFloatUnchecked() > right.GetFloatUnchecked();
                else
                    return left.GetFloatUnchecked() > right.GetHashCode();
            }
            else if (right.Type == VariableType.Real)
                return left.GetHashCode() > right.GetFloatUnchecked();
            else
                return left.GetHashCode() > right.GetHashCode();
        }

        public static bool operator >(TsObject left, float right)
        {
            if (left.Type == VariableType.Real)
                return left.GetFloatUnchecked() > right;
            return left.GetHashCode() > right;
        }

        public static bool operator >(float left, TsObject right)
        {
            if (right.Type == VariableType.Real)
                return left > right.GetFloatUnchecked();
            return left > right.GetHashCode();
        }

        public static bool operator >(TsObject left, string right)
        {
            if (left.Type == VariableType.Real)
                return left.GetFloatUnchecked() > right.GetHashCode();
            return left.GetHashCode() > right.GetHashCode();
        }

        public static bool operator >(string left, TsObject right)
        {
            if (right.Type == VariableType.Real)
                return left.GetHashCode() > right.GetFloatUnchecked();
            return left.GetHashCode() > right.GetHashCode();
        }

        public static bool operator <=(TsObject left, TsObject right)
        {
            return left == right || left < right;
        }

        public static bool operator <=(TsObject left, float right)
        {
            return left == right || left < right;
        }

        public static bool operator <=(float left, TsObject right)
        {
            return left == right || left < right;
        }

        public static bool operator <=(TsObject left, string right)
        {
            return left == right || left < right;
        }

        public static bool operator <=(string left, TsObject right)
        {
            return left == right || left < right;
        }

        public static bool operator >=(TsObject left, TsObject right)
        {
            return left == right || left > right;
        }

        public static bool operator >=(TsObject left, float right)
        {
            return left == right || left > right;
        }

        public static bool operator >=(float left, TsObject right)
        {
            return left == right || left > right;
        }

        public static bool operator >=(TsObject left, string right)
        {
            return left == right || left > right;
        }

        public static bool operator >=(string left, TsObject right)
        {
            return left == right || left > right;
        }

        #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member

        #endregion

        #region Base Class Library

        public static bool IsArray(TsObject obj)
        {
            return obj.Type == VariableType.Array1 || obj.Type == VariableType.Array2;
        }

        public static bool IsReal(TsObject obj)
        {
            return obj.Type == VariableType.Real;
        }

        public static bool IsString(TsObject obj)
        {
            return obj.Type == VariableType.String;
        }

        public static bool IsDelegate(TsObject obj)
        {
            return obj.Type == VariableType.Delegate;
        }

        public static bool IsNull(TsObject obj)
        {
            return obj.Type == VariableType.Null;
        }

        public static string Typeof(TsObject obj)
        {
            switch(obj.Type)
            {
                case VariableType.Array1:
                    return "array1";
                case VariableType.Array2:
                    return "array2";
                case VariableType.Null:
                    return "null";
                case VariableType.Real:
                    return "real";
                case VariableType.String:
                    return "string";
                case VariableType.Delegate:
                    return "script";
                case VariableType.Instance:
                    return obj.GetInstanceUnchecked().ObjectType;
                default:
                    return "unknown";
            }
        }

        #endregion
    }
}

repository: redchew-fork/TaffyScript

repo_name: redchew-fork/TaffyScript

extension: cs


text:
package listener

import (
	"fgame/fgame/core/event"
	gameevent "fgame/fgame/game/event"
	fashioneventtypes "fgame/fgame/game/fashion/event/types"
	"fgame/fgame/game/player"
	teamlogic "fgame/fgame/game/team/logic"
	"fgame/fgame/game/team/pbutil"
	"fgame/fgame/game/team/team"
)

//玩家时装变化变化
func fashionChanged(target event.EventTarget, data event.EventData) (err error) {
	pl, ok := target.(player.Player)
	if !ok {
		return
	}
	teamId := pl.GetTeamId()
	if teamId == 0 {
		return
	}

	playerId := pl.GetId()
	fashionId := pl.GetFashionId()
	teamData := team.GetTeamService().GetTeam(teamId)
	if teamData == nil {
		return
	}
	member, _ := teamData.GetMember(playerId)
	if member == nil {
		return
	}

	member.SetFashionId(fashionId)
	scTeamBroadcast := pbutil.BuildSCTeamFashionChange(playerId, fashionId)
	teamlogic.BroadcastMsg(teamData, scTeamBroadcast)
	return
}

func init() {
	gameevent.AddEventListener(fashioneventtypes.EventTypeFashionChanged, event.EventListenerFunc(fashionChanged))
}

repository: rebider/Fgame

repo_name: rebider/Fgame

gha_license_id: MIT


text:
SUMMARY = "Phosphor OpenBMC - Debug Tools"
PR = "r1"

inherit packagegroup

RDEPENDS:${PN} = " \
    strace \
    ldd \
    ethtool \
    net-tools \
    phosphor-logging-test \
    lmsensors-sensors \
    tcpdump \
    screen \
    valgrind \
    iperf3 \
    "
# Some older arm architectures don't support valgrind, so explicitly remove
# it as a dependency from them, but keep it by default in anything newer.
RDEPENDS:${PN}:remove:armv5 = "valgrind"
RDEPENDS:${PN}:remove:armv6 = "valgrind"

repository: openbmc/openbmc

repo_name: openbmc/openbmc

gha_license_id: NOASSERTION

gha_language: Python