text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="7.2.0">
<drawing>
<settings>
<setting alwaysvectorfont="yes"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.05" unitdist="inch" unit="inch" style="lines" multiple="1" display="yes" altdistance="0.005" altunitdist="inch" altunit="inch"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="yes" active="yes"/>
<layer number="2" name="Route2" color="1" fill="3" visible="no" active="no"/>
<layer number="3" name="Route3" color="4" fill="3" visible="no" active="no"/>
<layer number="4" name="Route4" color="1" fill="4" visible="no" active="no"/>
<layer number="5" name="Route5" color="4" fill="4" visible="no" active="no"/>
<layer number="6" name="Route6" color="1" fill="8" visible="no" active="no"/>
<layer number="7" name="Route7" color="4" fill="8" visible="no" active="no"/>
<layer number="8" name="Route8" color="1" fill="2" visible="no" active="no"/>
<layer number="9" name="Route9" color="4" fill="2" visible="no" active="no"/>
<layer number="10" name="Route10" color="1" fill="7" visible="no" active="no"/>
<layer number="11" name="Route11" color="4" fill="7" visible="no" active="no"/>
<layer number="12" name="Route12" color="1" fill="5" visible="no" active="no"/>
<layer number="13" name="Route13" color="4" fill="5" visible="no" active="no"/>
<layer number="14" name="Route14" color="1" fill="6" visible="no" active="no"/>
<layer number="15" name="Route15" color="4" fill="6" visible="no" active="no"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>
<layer number="17" name="Pads" color="2" fill="1" visible="yes" active="yes"/>
<layer number="18" name="Vias" color="2" fill="1" visible="yes" active="yes"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="yes" active="yes"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="yes" active="yes"/>
<layer number="21" name="tPlace" color="16" fill="1" visible="yes" active="yes"/>
<layer number="22" name="bPlace" color="14" fill="1" visible="yes" active="yes"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="yes" active="yes"/>
<layer number="25" name="tNames" color="7" fill="1" visible="no" active="yes"/>
<layer number="26" name="bNames" color="7" fill="1" visible="no" active="yes"/>
<layer number="27" name="tValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="28" name="bValues" color="7" fill="1" visible="no" active="yes"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" active="yes"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="yes"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="yes"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="yes"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="yes"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="yes"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="yes"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="yes"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="yes"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="no" active="yes"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="yes"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="no" active="yes"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="yes"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="yes"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="yes"/>
<layer number="45" name="Holes" color="7" fill="1" visible="yes" active="yes"/>
<layer number="46" name="Milling" color="3" fill="1" visible="no" active="yes"/>
<layer number="47" name="Measures" color="7" fill="1" visible="no" active="yes"/>
<layer number="48" name="Document" color="7" fill="1" visible="no" active="yes"/>
<layer number="49" name="Reference" color="7" fill="1" visible="no" active="yes"/>
<layer number="50" name="dxf" color="7" fill="1" visible="no" active="yes"/>
<layer number="51" name="tDocu" color="6" fill="1" visible="yes" active="yes"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="no" active="yes"/>
<layer number="53" name="tGND_GNDA" color="7" fill="9" visible="no" active="no"/>
<layer number="54" name="bGND_GNDA" color="1" fill="9" visible="no" active="no"/>
<layer number="56" name="wert" color="7" fill="1" visible="no" active="yes"/>
<layer number="91" name="Nets" color="2" fill="1" visible="no" active="no"/>
<layer number="92" name="Busses" color="1" fill="1" visible="no" active="no"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="no"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="no" active="no"/>
<layer number="95" name="Names" color="7" fill="1" visible="no" active="no"/>
<layer number="96" name="Values" color="7" fill="1" visible="no" active="no"/>
<layer number="97" name="Info" color="7" fill="1" visible="no" active="no"/>
<layer number="98" name="Guide" color="6" fill="1" visible="no" active="no"/>
<layer number="100" name="Muster" color="7" fill="1" visible="no" active="no"/>
<layer number="101" name="Patch_Top" color="12" fill="4" visible="no" active="yes"/>
<layer number="102" name="Vscore" color="7" fill="1" visible="no" active="yes"/>
<layer number="103" name="tMap" color="7" fill="1" visible="no" active="yes"/>
<layer number="104" name="Name" color="16" fill="1" visible="no" active="yes"/>
<layer number="105" name="tPlate" color="7" fill="1" visible="no" active="yes"/>
<layer number="106" name="bPlate" color="7" fill="1" visible="no" active="yes"/>
<layer number="107" name="Crop" color="7" fill="1" visible="no" active="yes"/>
<layer number="116" name="Patch_BOT" color="9" fill="4" visible="no" active="yes"/>
<layer number="121" name="_tsilk" color="7" fill="1" visible="no" active="yes"/>
<layer number="122" name="_bsilk" color="7" fill="1" visible="no" active="yes"/>
<layer number="125" name="_tNames" color="7" fill="1" visible="no" active="yes"/>
<layer number="144" name="Drill_legend" color="7" fill="1" visible="no" active="yes"/>
<layer number="151" name="HeatSink" color="7" fill="1" visible="no" active="yes"/>
<layer number="200" name="200bmp" color="1" fill="10" visible="no" active="yes"/>
<layer number="201" name="201bmp" color="2" fill="10" visible="no" active="yes"/>
<layer number="202" name="202bmp" color="3" fill="10" visible="no" active="yes"/>
<layer number="203" name="203bmp" color="4" fill="10" visible="no" active="yes"/>
<layer number="204" name="204bmp" color="5" fill="10" visible="no" active="yes"/>
<layer number="205" name="205bmp" color="6" fill="10" visible="no" active="yes"/>
<layer number="206" name="206bmp" color="7" fill="10" visible="no" active="yes"/>
<layer number="207" name="207bmp" color="8" fill="10" visible="no" active="yes"/>
<layer number="208" name="208bmp" color="9" fill="10" visible="no" active="yes"/>
<layer number="209" name="209bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="210" name="210bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="211" name="211bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="212" name="212bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="213" name="213bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="214" name="214bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="215" name="215bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="216" name="216bmp" color="7" fill="1" visible="no" active="yes"/>
<layer number="250" name="Descript" color="3" fill="1" visible="no" active="no"/>
<layer number="251" name="SMDround" color="12" fill="11" visible="no" active="no"/>
<layer number="254" name="cooling" color="7" fill="1" visible="no" active="yes"/>
</layers>
<board>
<plain>
<wire x1="0" y1="0" x2="17.76" y2="0" width="0.254" layer="20"/>
<wire x1="17.76" y1="0" x2="17.78" y2="17.78" width="0.254" layer="20"/>
<wire x1="17.78" y1="17.78" x2="0" y2="17.78" width="0.254" layer="20"/>
<wire x1="0" y1="17.78" x2="0" y2="0" width="0.254" layer="20"/>
<wire x1="14.3002" y1="7.747" x2="16.8402" y2="7.747" width="0.254" layer="21"/>
<wire x1="16.8402" y1="7.747" x2="16.3322" y2="7.239" width="0.254" layer="21"/>
<wire x1="16.8402" y1="7.747" x2="16.3322" y2="8.255" width="0.254" layer="21"/>
<wire x1="14.3002" y1="7.747" x2="14.3002" y2="10.287" width="0.254" layer="21"/>
<wire x1="14.3002" y1="10.287" x2="13.7922" y2="9.779" width="0.254" layer="21"/>
<wire x1="14.3002" y1="10.287" x2="14.8082" y2="9.779" width="0.254" layer="21"/>
<circle x="15.1892" y="8.636" radius="0.5236" width="0.254" layer="21"/>
<circle x="15.1892" y="8.636" radius="0.127" width="0.254" layer="21"/>
<text x="9.525" y="2.794" size="1.27" layer="22" font="vector" ratio="15" rot="MR90">VCC</text>
<text x="12.065" y="2.794" size="1.27" layer="22" font="vector" ratio="15" rot="MR90">GND</text>
<text x="6.985" y="2.794" size="1.27" layer="22" font="vector" ratio="15" rot="MR90">SDA</text>
<text x="4.445" y="2.921" size="1.27" layer="22" font="vector" ratio="15" rot="MR90">SCL</text>
<text x="0.762" y="13.208" size="1.27" layer="21" font="vector" ratio="15" rot="SR270">HMC5883L</text>
<text x="1.27" y="7.62" size="1.016" layer="16" font="vector" ratio="15" rot="MR270">7-8-11</text>
<text x="14.605" y="6.477" size="1.27" layer="21" font="vector" ratio="15" rot="MR90">X</text>
<text x="13.716" y="10.414" size="1.27" layer="21" font="vector" ratio="15" rot="MR90">Y</text>
<text x="15.748" y="10.287" size="1.27" layer="21" font="vector" ratio="15" rot="R270">Z</text>
</plain>
<libraries>
<library name="SparkFun">
<packages>
<package name="16LPCC">
<wire x1="-1.7" y1="-1.7" x2="-1.7" y2="-1.1" width="0.2032" layer="21"/>
<wire x1="-1.7" y1="-1.7" x2="-1.1" y2="-1.7" width="0.2032" layer="21"/>
<wire x1="1.1" y1="-1.7" x2="1.7" y2="-1.7" width="0.2032" layer="21"/>
<wire x1="1.7" y1="-1.7" x2="1.7" y2="-1.1" width="0.2032" layer="21"/>
<wire x1="1.7" y1="1.1" x2="1.7" y2="1.7" width="0.2032" layer="21"/>
<wire x1="1.7" y1="1.7" x2="1.1" y2="1.7" width="0.2032" layer="21"/>
<wire x1="-1.28" y1="1.635" x2="-1.635" y2="1.26" width="0.2032" layer="21"/>
<smd name="4" x="-1.37" y="-0.75" dx="0.65" dy="0.28" layer="1"/>
<smd name="3" x="-1.37" y="-0.25" dx="0.65" dy="0.28" layer="1"/>
<smd name="2" x="-1.37" y="0.25" dx="0.65" dy="0.28" layer="1"/>
<smd name="1" x="-1.37" y="0.75" dx="0.65" dy="0.28" layer="1"/>
<smd name="5" x="-0.75" y="-1.37" dx="0.65" dy="0.28" layer="1" rot="R270"/>
<smd name="15" x="-0.25" y="1.37" dx="0.65" dy="0.28" layer="1" rot="R90"/>
<smd name="14" x="0.25" y="1.37" dx="0.65" dy="0.28" layer="1" rot="R90"/>
<smd name="13" x="0.75" y="1.37" dx="0.65" dy="0.28" layer="1" rot="R90"/>
<smd name="12" x="1.37" y="0.75" dx="0.65" dy="0.28" layer="1"/>
<smd name="11" x="1.37" y="0.25" dx="0.65" dy="0.28" layer="1"/>
<smd name="10" x="1.37" y="-0.25" dx="0.65" dy="0.28" layer="1"/>
<smd name="9" x="1.37" y="-0.75" dx="0.65" dy="0.28" layer="1"/>
<smd name="6" x="-0.25" y="-1.37" dx="0.65" dy="0.28" layer="1" rot="R90"/>
<smd name="8" x="0.75" y="-1.37" dx="0.65" dy="0.28" layer="1" rot="R90"/>
<smd name="16" x="-0.75" y="1.37" dx="0.65" dy="0.28" layer="1" rot="R90"/>
<smd name="7" x="0.25" y="-1.37" dx="0.65" dy="0.28" layer="1" rot="R90"/>
<text x="-1.27" y="1.905" size="0.6096" layer="25">>NAME</text>
<text x="-1.905" y="-2.54" size="0.6096" layer="27">>VALUE</text>
</package>
<package name="0402-CAP">
<description>CAPACITOR

chip</description>
<wire x1="-0.245" y1="0.224" x2="0.245" y2="0.224" width="0.1524" layer="51"/>
<wire x1="0.245" y1="-0.224" x2="-0.245" y2="-0.224" width="0.1524" layer="51"/>
<wire x1="-1.473" y1="0.483" x2="1.473" y2="0.483" width="0.0508" layer="39"/>
<wire x1="1.473" y1="0.483" x2="1.473" y2="-0.483" width="0.0508" layer="39"/>
<wire x1="1.473" y1="-0.483" x2="-1.473" y2="-0.483" width="0.0508" layer="39"/>
<wire x1="-1.473" y1="-0.483" x2="-1.473" y2="0.483" width="0.0508" layer="39"/>
<wire x1="0" y1="0.0305" x2="0" y2="-0.0305" width="0.4064" layer="21"/>
<smd name="1" x="-0.65" y="0" dx="0.7" dy="0.9" layer="1"/>
<smd name="2" x="0.65" y="0" dx="0.7" dy="0.9" layer="1"/>
<text x="-0.889" y="0.6985" size="0.4064" layer="25">>NAME</text>
<text x="-1.0795" y="-1.143" size="0.4064" layer="27">>VALUE</text>
<rectangle x1="-0.554" y1="-0.3048" x2="-0.254" y2="0.2951" layer="51"/>
<rectangle x1="0.2588" y1="-0.3048" x2="0.5588" y2="0.2951" layer="51"/>
<rectangle x1="-0.1999" y1="-0.3" x2="0.1999" y2="0.3" layer="35"/>
</package>
<package name="0402-RES">
<description>CAPACITOR

chip</description>
<wire x1="-0.245" y1="0.224" x2="0.245" y2="0.224" width="0.1524" layer="51"/>
<wire x1="0.245" y1="-0.224" x2="-0.245" y2="-0.224" width="0.1524" layer="51"/>
<wire x1="-1.473" y1="0.483" x2="1.473" y2="0.483" width="0.0508" layer="39"/>
<wire x1="1.473" y1="0.483" x2="1.473" y2="-0.483" width="0.0508" layer="39"/>
<wire x1="1.473" y1="-0.483" x2="-1.473" y2="-0.483" width="0.0508" layer="39"/>
<wire x1="-1.473" y1="-0.483" x2="-1.473" y2="0.483" width="0.0508" layer="39"/>
<smd name="1" x="-0.65" y="0" dx="0.7" dy="0.9" layer="1"/>
<smd name="2" x="0.65" y="0" dx="0.7" dy="0.9" layer="1"/>
<text x="-0.889" y="0.6985" size="0.4064" layer="25">>NAME</text>
<text x="-1.0795" y="-1.143" size="0.4064" layer="27">>VALUE</text>
<rectangle x1="-0.554" y1="-0.3048" x2="-0.254" y2="0.2951" layer="51"/>
<rectangle x1="0.2588" y1="-0.3048" x2="0.5588" y2="0.2951" layer="51"/>
<rectangle x1="-0.1999" y1="-0.3" x2="0.1999" y2="0.3" layer="35"/>
<rectangle x1="-0.2032" y1="-0.3556" x2="0.2032" y2="0.3556" layer="21"/>
</package>
<package name="1X04">
<wire x1="6.985" y1="1.27" x2="8.255" y2="1.27" width="0.2032" layer="21"/>
<wire x1="8.255" y1="1.27" x2="8.89" y2="0.635" width="0.2032" layer="21"/>
<wire x1="8.89" y1="-0.635" x2="8.255" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="3.81" y1="0.635" x2="4.445" y2="1.27" width="0.2032" layer="21"/>
<wire x1="4.445" y1="1.27" x2="5.715" y2="1.27" width="0.2032" layer="21"/>
<wire x1="5.715" y1="1.27" x2="6.35" y2="0.635" width="0.2032" layer="21"/>
<wire x1="6.35" y1="-0.635" x2="5.715" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="5.715" y1="-1.27" x2="4.445" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="4.445" y1="-1.27" x2="3.81" y2="-0.635" width="0.2032" layer="21"/>
<wire x1="6.985" y1="1.27" x2="6.35" y2="0.635" width="0.2032" layer="21"/>
<wire x1="6.35" y1="-0.635" x2="6.985" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="8.255" y1="-1.27" x2="6.985" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="-0.635" y1="1.27" x2="0.635" y2="1.27" width="0.2032" layer="21"/>
<wire x1="0.635" y1="1.27" x2="1.27" y2="0.635" width="0.2032" layer="21"/>
<wire x1="1.27" y1="-0.635" x2="0.635" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="1.27" y1="0.635" x2="1.905" y2="1.27" width="0.2032" layer="21"/>
<wire x1="1.905" y1="1.27" x2="3.175" y2="1.27" width="0.2032" layer="21"/>
<wire x1="3.175" y1="1.27" x2="3.81" y2="0.635" width="0.2032" layer="21"/>
<wire x1="3.81" y1="-0.635" x2="3.175" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="3.175" y1="-1.27" x2="1.905" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="1.905" y1="-1.27" x2="1.27" y2="-0.635" width="0.2032" layer="21"/>
<wire x1="-1.27" y1="0.635" x2="-1.27" y2="-0.635" width="0.2032" layer="21"/>
<wire x1="-0.635" y1="1.27" x2="-1.27" y2="0.635" width="0.2032" layer="21"/>
<wire x1="-1.27" y1="-0.635" x2="-0.635" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="0.635" y1="-1.27" x2="-0.635" y2="-1.27" width="0.2032" layer="21"/>
<wire x1="8.89" y1="0.635" x2="8.89" y2="-0.635" width="0.2032" layer="21"/>
<pad name="1" x="0" y="0" drill="1.016" diameter="1.8796" shape="square" rot="R90"/>
<pad name="2" x="2.54" y="0" drill="1.016" diameter="1.8796" rot="R90"/>
<pad name="3" x="5.08" y="0" drill="1.016" diameter="1.8796" rot="R90"/>
<pad name="4" x="7.62" y="0" drill="1.016" diameter="1.8796" rot="R90"/>
<text x="-1.3462" y="1.8288" size="1.27" layer="25" ratio="10">>NAME</text>
<text x="-1.27" y="-3.175" size="1.27" layer="27">>VALUE</text>
<rectangle x1="7.366" y1="-0.254" x2="7.874" y2="0.254" layer="51"/>
<rectangle x1="4.826" y1="-0.254" x2="5.334" y2="0.254" layer="51"/>
<rectangle x1="2.286" y1="-0.254" x2="2.794" y2="0.254" layer="51"/>
<rectangle x1="-0.254" y1="-0.254" x2="0.254" y2="0.254" layer="51"/>
</package>
<package name="CREATIVE_COMMONS">
<text x="-20.32" y="5.08" size="1.778" layer="27">Released under the Creative Commons Attribution Share-Alike 3.0 License</text>
<text x="0" y="2.54" size="1.778" layer="27">http://creativecommons.org/licenses/by-sa/3.0</text>
<text x="11.43" y="0" size="1.778" layer="27">Designed by:</text>
</package>
<package name="STAND-OFF">
<description>Stand Off

This is the mechanical footprint for a #4 phillips button head screw. Use the keepout ring to avoid running the screw head into surrounding components. SKU : PRT-00447</description>
<wire x1="0" y1="1.8542" x2="0" y2="-1.8542" width="0.2032" layer="41" curve="-180"/>
<wire x1="0" y1="-1.8542" x2="0" y2="1.8542" width="0.2032" layer="41" curve="-180"/>
<wire x1="0" y1="-1.8542" x2="0" y2="1.8542" width="0.2032" layer="42" curve="180"/>
<wire x1="0" y1="-1.8542" x2="0" y2="1.8542" width="0.2032" layer="42" curve="-180"/>
<circle x="0" y="0" radius="2.794" width="0.127" layer="39"/>
<hole x="0" y="0" drill="3.302"/>
</package>
<package name="SFE-LOGO-FLAME">
<polygon width="0.0254" layer="21">
<vertex x="0.5462" y="1.8974"/>
<vertex x="0.4979" y="1.905" curve="17.884178"/>
<vertex x="0.3099" y="1.905" curve="46.327753"/>
<vertex x="0.0712" y="1.7551" curve="35.91905"/>
<vertex x="0.0001" y="1.5189"/>
<vertex x="0.0001" y="0.0025"/>
<vertex x="0.4877" y="0.5512" curve="-23.528974"/>
<vertex x="0.6757" y="0.6909" curve="-19.885101"/>
<vertex x="0.7519" y="0.7112"/>
<vertex x="0.9805" y="0.7112" curve="31.19409"/>
<vertex x="1.3717" y="0.8204" curve="24.226678"/>
<vertex x="1.679" y="1.11" curve="41.579705"/>
<vertex x="1.8593" y="1.844" curve="25.48189"/>
<vertex x="1.7527" y="2.1412" curve="24.327175"/>
<vertex x="1.5495" y="2.347"/>
<vertex x="1.5495" y="2.2581" curve="-30.728978"/>
<vertex x="1.5418" y="2.2301" curve="-33.047583"/>
<vertex x="1.4733" y="2.1666" curve="-11.956766"/>
<vertex x="1.4529" y="2.159" curve="-49.772638"/>
<vertex x="1.2878" y="2.1895" curve="-0.938211"/>
<vertex x="1.1964" y="2.2555" curve="-17.462115"/>
<vertex x="1.1177" y="2.3343" curve="-18.133005"/>
<vertex x="1.0669" y="2.4333" curve="-27.405164"/>
<vertex x="1.0618" y="2.4994" curve="-60.325263"/>
<vertex x="1.2015" y="2.6695" curve="-18.806378"/>
<vertex x="1.3056" y="2.6899" curve="-3.38798"/>
<vertex x="1.3666" y="2.6899"/>
<vertex x="1.3665" y="2.6899"/>
<vertex x="1.364" y="2.6924" curve="28.458071"/>
<vertex x="1.2701" y="2.7483" curve="-13.16107"/>
<vertex x="1.2345" y="2.7635" curve="11.36204"/>
<vertex x="1.2116" y="2.7737" curve="17.239689"/>
<vertex x="1.0338" y="2.8042" curve="33.13693"/>
<vertex x="0.7849" y="2.7356" curve="15.258219"/>
<vertex x="0.6376" y="2.6137" curve="72.107848"/>
<vertex x="0.597" y="2.2682" curve="18.59376"/>
<vertex x="0.8611" y="1.938" curve="-104.814891"/>
<vertex x="0.8332" y="1.5799" curve="-28.91879"/>
<vertex x="0.6528" y="1.5189" curve="-42.347638"/>
<vertex x="0.4446" y="1.5824" curve="-32.991127"/>
<vertex x="0.3887" y="1.6612" curve="-37.722834"/>
<vertex x="0.3887" y="1.7958" curve="-35.953185"/>
<vertex x="0.4115" y="1.8263" curve="1.480237"/>
<vertex x="0.4954" y="1.8872" curve="-50.628124"/>
</polygon>
</package>
<package name="OSHW-LOGO-M">
<polygon width="0.15" layer="21">
<vertex x="0.6578" y="-1.588" curve="9.499253"/>
<vertex x="0.9108" y="-1.4576"/>
<vertex x="1.5392" y="-1.97"/>
<vertex x="1.97" y="-1.5392"/>
<vertex x="1.4576" y="-0.9108" curve="19.001165"/>
<vertex x="1.6747" y="-0.3866"/>
<vertex x="2.4814" y="-0.3047"/>
<vertex x="2.4814" y="0.3047"/>
<vertex x="1.6747" y="0.3866" curve="19.001165"/>
<vertex x="1.4576" y="0.9108"/>
<vertex x="1.97" y="1.5392"/>
<vertex x="1.5392" y="1.97"/>
<vertex x="0.9108" y="1.4576" curve="19.001165"/>
<vertex x="0.3866" y="1.6747"/>
<vertex x="0.3047" y="2.4814"/>
<vertex x="-0.3047" y="2.4814"/>
<vertex x="-0.3866" y="1.6747" curve="19.001165"/>
<vertex x="-0.9108" y="1.4576"/>
<vertex x="-1.5392" y="1.97"/>
<vertex x="-1.97" y="1.5392"/>
<vertex x="-1.4576" y="0.9108" curve="19.001165"/>
<vertex x="-1.6747" y="0.3866"/>
<vertex x="-2.4814" y="0.3047"/>
<vertex x="-2.4814" y="-0.3047"/>
<vertex x="-1.6747" y="-0.3866" curve="19.001165"/>
<vertex x="-1.4576" y="-0.9108"/>
<vertex x="-1.97" y="-1.5392"/>
<vertex x="-1.5392" y="-1.97"/>
<vertex x="-0.9108" y="-1.4576" curve="9.499253"/>
<vertex x="-0.6578" y="-1.588"/>
<vertex x="-0.299" y="-0.7218" curve="-67.507353"/>
<vertex x="-0.7813" y="0" curve="-247.497552"/>
<vertex x="0.299" y="-0.7218"/>
</polygon>
</package>
</packages>
</library>
<library name="abes">
<packages>
<package name="FIDUCIAL-1X2.5">
<smd name="1" x="0" y="0" dx="0.635" dy="0.635" layer="1" roundness="100" cream="no"/>
</package>
</packages>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0" drill="0">
</class>
</classes>
<designrules name="SparkFun">
<description language="en">EAGLE Design Rules

The default Design Rules have been set to cover
a wide range of applications. Your particular design
may have different requirements, so please make the
necessary adjustments and save your customized
design rules under a new name.</description>
<param name="layerSetup" value="(1*16)"/>
<param name="mtCopper" value="0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm 0.035mm"/>
<param name="mtIsolate" value="1.5mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm 0.15mm 0.2mm"/>
<param name="mdWireWire" value="8mil"/>
<param name="mdWirePad" value="8mil"/>
<param name="mdWireVia" value="8mil"/>
<param name="mdPadPad" value="8mil"/>
<param name="mdPadVia" value="8mil"/>
<param name="mdViaVia" value="8mil"/>
<param name="mdSmdPad" value="8mil"/>
<param name="mdSmdVia" value="8mil"/>
<param name="mdSmdSmd" value="8mil"/>
<param name="mdViaViaSameLayer" value="8mil"/>
<param name="mnLayersViaInSmd" value="2"/>
<param name="mdCopperDimension" value="8mil"/>
<param name="mdDrill" value="8mil"/>
<param name="mdSmdStop" value="0mil"/>
<param name="msWidth" value="8mil"/>
<param name="msDrill" value="20mil"/>
<param name="msMicroVia" value="9.99mm"/>
<param name="msBlindViaRatio" value="0.5"/>
<param name="rvPadTop" value="0.25"/>
<param name="rvPadInner" value="0.25"/>
<param name="rvPadBottom" value="0.25"/>
<param name="rvViaOuter" value="0.25"/>
<param name="rvViaInner" value="0.25"/>
<param name="rvMicroViaOuter" value="0.25"/>
<param name="rvMicroViaInner" value="0.25"/>
<param name="rlMinPadTop" value="12mil"/>
<param name="rlMaxPadTop" value="20mil"/>
<param name="rlMinPadInner" value="10mil"/>
<param name="rlMaxPadInner" value="20mil"/>
<param name="rlMinPadBottom" value="12mil"/>
<param name="rlMaxPadBottom" value="20mil"/>
<param name="rlMinViaOuter" value="10mil"/>
<param name="rlMaxViaOuter" value="20mil"/>
<param name="rlMinViaInner" value="10mil"/>
<param name="rlMaxViaInner" value="20mil"/>
<param name="rlMinMicroViaOuter" value="4mil"/>
<param name="rlMaxMicroViaOuter" value="20mil"/>
<param name="rlMinMicroViaInner" value="4mil"/>
<param name="rlMaxMicroViaInner" value="20mil"/>
<param name="psTop" value="-1"/>
<param name="psBottom" value="-1"/>
<param name="psFirst" value="-1"/>
<param name="psElongationLong" value="100"/>
<param name="psElongationOffset" value="100"/>
<param name="mvStopFrame" value="1"/>
<param name="mvCreamFrame" value="0"/>
<param name="mlMinStopFrame" value="4mil"/>
<param name="mlMaxStopFrame" value="4mil"/>
<param name="mlMinCreamFrame" value="0mil"/>
<param name="mlMaxCreamFrame" value="0mil"/>
<param name="mlViaStopLimit" value="20mil"/>
<param name="srRoundness" value="0"/>
<param name="srMinRoundness" value="0mil"/>
<param name="srMaxRoundness" value="0mil"/>
<param name="slThermalIsolate" value="10mil"/>
<param name="slThermalsForVias" value="0"/>
<param name="dpMaxLengthDifference" value="10mm"/>
<param name="dpGapFactor" value="2.5"/>
<param name="checkGrid" value="0"/>
<param name="checkAngle" value="0"/>
<param name="checkFont" value="1"/>
<param name="checkRestrict" value="1"/>
<param name="useDiameter" value="13"/>
<param name="maxErrors" value="50"/>
</designrules>
<autorouter>
<pass name="Default">
<param name="RoutingGrid" value="50mil"/>
<param name="AutoGrid" value="1"/>
<param name="Efforts" value="0"/>
<param name="TopRouterVariant" value="1"/>
<param name="tpViaShape" value="round"/>
<param name="PrefDir.1" value="|"/>
<param name="PrefDir.2" value="0"/>
<param name="PrefDir.3" value="0"/>
<param name="PrefDir.4" value="0"/>
<param name="PrefDir.5" value="0"/>
<param name="PrefDir.6" value="0"/>
<param name="PrefDir.7" value="0"/>
<param name="PrefDir.8" value="0"/>
<param name="PrefDir.9" value="0"/>
<param name="PrefDir.10" value="0"/>
<param name="PrefDir.11" value="0"/>
<param name="PrefDir.12" value="0"/>
<param name="PrefDir.13" value="0"/>
<param name="PrefDir.14" value="0"/>
<param name="PrefDir.15" value="0"/>
<param name="PrefDir.16" value="-"/>
<param name="cfVia" value="8"/>
<param name="cfNonPref" value="5"/>
<param name="cfChangeDir" value="2"/>
<param name="cfOrthStep" value="2"/>
<param name="cfDiagStep" value="3"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="1"/>
<param name="cfMalusStep" value="1"/>
<param name="cfPadImpact" value="4"/>
<param name="cfSmdImpact" value="4"/>
<param name="cfBusImpact" value="0"/>
<param name="cfHugging" value="3"/>
<param name="cfAvoid" value="4"/>
<param name="cfPolygon" value="10"/>
<param name="cfBase.1" value="0"/>
<param name="cfBase.2" value="1"/>
<param name="cfBase.3" value="1"/>
<param name="cfBase.4" value="1"/>
<param name="cfBase.5" value="1"/>
<param name="cfBase.6" value="1"/>
<param name="cfBase.7" value="1"/>
<param name="cfBase.8" value="1"/>
<param name="cfBase.9" value="1"/>
<param name="cfBase.10" value="1"/>
<param name="cfBase.11" value="1"/>
<param name="cfBase.12" value="1"/>
<param name="cfBase.13" value="1"/>
<param name="cfBase.14" value="1"/>
<param name="cfBase.15" value="1"/>
<param name="cfBase.16" value="0"/>
<param name="mnVias" value="20"/>
<param name="mnSegments" value="9999"/>
<param name="mnExtdSteps" value="9999"/>
<param name="mnRipupLevel" value="10"/>
<param name="mnRipupSteps" value="100"/>
<param name="mnRipupTotal" value="100"/>
</pass>
<pass name="Follow-me" refer="Default" active="yes">
</pass>
<pass name="Busses" refer="Default" active="yes">
<param name="cfNonPref" value="4"/>
<param name="cfBusImpact" value="4"/>
<param name="cfHugging" value="0"/>
<param name="mnVias" value="0"/>
</pass>
<pass name="Route" refer="Default" active="yes">
</pass>
<pass name="Optimize1" refer="Default" active="yes">
<param name="cfVia" value="99"/>
<param name="cfExtdStep" value="10"/>
<param name="cfHugging" value="1"/>
<param name="mnExtdSteps" value="1"/>
<param name="mnRipupLevel" value="0"/>
</pass>
<pass name="Optimize2" refer="Optimize1" active="yes">
<param name="cfNonPref" value="0"/>
<param name="cfChangeDir" value="6"/>
<param name="cfExtdStep" value="0"/>
<param name="cfBonusStep" value="2"/>
<param name="cfMalusStep" value="2"/>
<param name="cfPadImpact" value="2"/>
<param name="cfSmdImpact" value="2"/>
<param name="cfHugging" value="0"/>
</pass>
<pass name="Optimize3" refer="Optimize2" active="yes">
<param name="cfChangeDir" value="8"/>
<param name="cfPadImpact" value="0"/>
<param name="cfSmdImpact" value="0"/>
</pass>
<pass name="Optimize4" refer="Optimize3" active="yes">
<param name="cfChangeDir" value="25"/>
</pass>
</autorouter>
<elements>
<element name="U1" library="SparkFun" package="16LPCC" value="HMC5883LSMD" x="8.89" y="8.89" rot="R90"/>
<element name="C1" library="SparkFun" package="0402-CAP" value=".1uF" x="11.43" y="6.35"/>
<element name="C2" library="SparkFun" package="0402-CAP" value=".22uF" x="7.62" y="12.7" rot="R270"/>
<element name="C3" library="SparkFun" package="0402-CAP" value="4.7uF" x="10.16" y="13.081"/>
<element name="R1" library="SparkFun" package="0402-RES" value="DNP" x="3.81" y="8.89" rot="R90"/>
<element name="R2" library="SparkFun" package="0402-RES" value="DNP" x="5.08" y="8.89" rot="R90"/>
<element name="JP1" library="SparkFun" package="1X04" value="" x="12.7" y="1.27" rot="R180"/>
<element name="U$1" library="SparkFun" package="CREATIVE_COMMONS" value="CREATIVE_COMMONS" x="3.81" y="-8.89"/>
<element name="JP2" library="SparkFun" package="STAND-OFF" value="STAND-OFF" x="2.54" y="15.24"/>
<element name="JP3" library="SparkFun" package="STAND-OFF" value="STAND-OFF" x="15.24" y="15.24"/>
<element name="JP4" library="SparkFun" package="SFE-LOGO-FLAME" value="LOGO-SFESK" x="3.81" y="12.319" rot="R270"/>
<element name="U$2" library="SparkFun" package="OSHW-LOGO-M" value="OSHW-LOGOM" x="8.89" y="13.97" rot="MR90"/>
<element name="JP5" library="abes" package="FIDUCIAL-1X2.5" value="FIDUCIAL1X2.5" x="1.27" y="1.27"/>
<element name="JP6" library="abes" package="FIDUCIAL-1X2.5" value="FIDUCIAL1X2.5" x="12.954" y="16.764"/>
</elements>
<signals>
<signal name="VCC">
<contactref element="U1" pad="4"/>
<contactref element="U1" pad="13"/>
<contactref element="U1" pad="2"/>
<contactref element="R1" pad="2"/>
<contactref element="R2" pad="2"/>
<contactref element="C1" pad="1"/>
<contactref element="JP1" pad="2"/>
<wire x1="5.18" y1="9.64" x2="7.52" y2="9.64" width="0.254" layer="1"/>
<wire x1="5.08" y1="9.54" x2="5.18" y2="9.64" width="0.254" layer="1"/>
<wire x1="3.81" y1="9.54" x2="5.08" y2="9.54" width="0.254" layer="1"/>
<wire x1="3.81" y1="9.54" x2="3.795" y2="9.525" width="0.254" layer="1"/>
<wire x1="9.64" y1="6.87" x2="9.64" y2="7.52" width="0.254" layer="1"/>
<wire x1="10.16" y1="6.35" x2="9.64" y2="6.87" width="0.254" layer="1"/>
<wire x1="10.16" y1="1.27" x2="10.16" y2="6.35" width="0.254" layer="1"/>
<wire x1="10.16" y1="6.35" x2="10.78" y2="6.35" width="0.254" layer="1"/>
<wire x1="8.64" y1="6.6" x2="8.64" y2="7.52" width="0.254" layer="1"/>
<wire x1="8.89" y1="6.35" x2="8.64" y2="6.6" width="0.254" layer="1"/>
<wire x1="10.16" y1="6.35" x2="8.89" y2="6.35" width="0.254" layer="1"/>
<wire x1="3.81" y1="10.287" x2="3.81" y2="9.54" width="0.254" layer="1"/>
<wire x1="3.302" y1="10.795" x2="3.81" y2="10.287" width="0.254" layer="1"/>
<wire x1="6.985" y1="7.112" x2="3.302" y2="10.795" width="0.254" layer="16"/>
<wire x1="6.985" y1="4.445" x2="6.985" y2="7.112" width="0.254" layer="16"/>
<wire x1="6.985" y1="4.445" x2="10.16" y2="1.27" width="0.254" layer="16"/>
<via x="3.302" y="10.795" extent="1-16" drill="0.508"/>
</signal>
<signal name="SCL">
<contactref element="U1" pad="1"/>
<contactref element="R1" pad="1"/>
<contactref element="JP1" pad="4"/>
<wire x1="3.81" y1="5.08" x2="3.81" y2="5.715" width="0.254" layer="1"/>
<wire x1="3.81" y1="5.715" x2="3.81" y2="8.24" width="0.254" layer="1"/>
<wire x1="5.08" y1="3.81" x2="3.81" y2="5.08" width="0.254" layer="1"/>
<wire x1="5.08" y1="1.27" x2="5.08" y2="3.81" width="0.254" layer="1"/>
<wire x1="8.14" y1="6.87" x2="8.14" y2="7.52" width="0.254" layer="1"/>
<wire x1="6.985" y1="5.715" x2="8.14" y2="6.87" width="0.254" layer="1"/>
<wire x1="3.81" y1="5.715" x2="6.985" y2="5.715" width="0.254" layer="1"/>
</signal>
<signal name="SDA">
<contactref element="U1" pad="16"/>
<contactref element="R2" pad="1"/>
<contactref element="JP1" pad="3"/>
<wire x1="5.18" y1="8.14" x2="7.52" y2="8.14" width="0.254" layer="1"/>
<wire x1="5.18" y1="8.14" x2="5.08" y2="8.24" width="0.254" layer="1"/>
<wire x1="6.35" y1="4.191" x2="6.35" y2="6.223" width="0.254" layer="16"/>
<wire x1="6.35" y1="6.223" x2="5.588" y2="6.985" width="0.254" layer="16"/>
<wire x1="5.18" y1="7.393" x2="5.18" y2="8.14" width="0.254" layer="1"/>
<wire x1="5.588" y1="6.985" x2="5.18" y2="7.393" width="0.254" layer="1"/>
<wire x1="7.62" y1="1.27" x2="7.62" y2="2.921" width="0.254" layer="16"/>
<wire x1="7.62" y1="2.921" x2="6.35" y2="4.191" width="0.254" layer="16"/>
<via x="5.588" y="6.985" extent="1-16" drill="0.508"/>
</signal>
<signal name="N$4">
<contactref element="U1" pad="8"/>
<contactref element="C2" pad="1"/>
<wire x1="10.26" y1="9.64" x2="10.272" y2="9.652" width="0.254" layer="1"/>
<wire x1="12.18" y1="9.64" x2="12.7" y2="10.16" width="0.254" layer="1"/>
<wire x1="10.26" y1="9.64" x2="12.18" y2="9.64" width="0.254" layer="1"/>
<wire x1="7.62" y1="14.097" x2="7.62" y2="13.35" width="0.254" layer="1"/>
<wire x1="8.128" y1="14.605" x2="7.62" y2="14.097" width="0.254" layer="1"/>
<wire x1="11.557" y1="14.605" x2="8.128" y2="14.605" width="0.254" layer="1"/>
<wire x1="12.7" y1="13.462" x2="11.557" y2="14.605" width="0.254" layer="1"/>
<wire x1="12.7" y1="10.16" x2="12.7" y2="13.462" width="0.254" layer="1"/>
</signal>
<signal name="N$5">
<contactref element="U1" pad="12"/>
<contactref element="C2" pad="2"/>
<wire x1="8.14" y1="10.91" x2="8.14" y2="10.26" width="0.254" layer="1"/>
<wire x1="7.62" y1="11.43" x2="8.14" y2="10.91" width="0.254" layer="1"/>
<wire x1="7.62" y1="12.05" x2="7.62" y2="11.43" width="0.254" layer="1"/>
</signal>
<signal name="GND">
<contactref element="C3" pad="2"/>
<contactref element="C1" pad="2"/>
<contactref element="U1" pad="9"/>
<contactref element="JP1" pad="1"/>
<contactref element="U1" pad="11"/>
<wire x1="8.64" y1="10.26" x2="8.636" y2="12.065" width="0.254" layer="1"/>
<wire x1="9.64" y1="10.26" x2="9.64" y2="10.91" width="0.254" layer="1"/>
<wire x1="9.64" y1="10.91" x2="10.287" y2="11.557" width="0.254" layer="1"/>
<wire x1="12.08" y1="7.889" x2="12.319" y2="8.128" width="0.254" layer="1"/>
<wire x1="12.08" y1="6.35" x2="12.08" y2="7.889" width="0.254" layer="1"/>
<via x="11.557" y="11.684" extent="1-16" drill="0.508"/>
<polygon width="0.254" layer="1" isolate="0.3048">
<vertex x="0" y="17.78"/>
<vertex x="17.78" y="17.78"/>
<vertex x="17.78" y="0"/>
<vertex x="0" y="0"/>
</polygon>
<polygon width="0.254" layer="16" isolate="0.3048">
<vertex x="0" y="17.78"/>
<vertex x="11.43" y="17.78"/>
<vertex x="11.43" y="10.922"/>
<vertex x="6.858" y="10.922"/>
<vertex x="6.858" y="5.207"/>
<vertex x="7.62" y="5.08"/>
<vertex x="7.62" y="0"/>
<vertex x="0" y="0"/>
</polygon>
<polygon width="0.254" layer="16" isolate="0.3048">
<vertex x="17.78" y="17.78"/>
<vertex x="10.922" y="17.78"/>
<vertex x="10.922" y="0"/>
<vertex x="17.78" y="0"/>
</polygon>
<polygon width="0.254" layer="16" isolate="0.3048">
<vertex x="7.62" y="6.858"/>
<vertex x="12.7" y="6.858"/>
<vertex x="12.7" y="0"/>
<vertex x="7.62" y="0"/>
</polygon>
</signal>
<signal name="N$1">
<contactref element="U1" pad="10"/>
<contactref element="C3" pad="1"/>
<wire x1="9.14" y1="10.26" x2="9.14" y2="11.553" width="0.254" layer="1"/>
<wire x1="9.14" y1="11.553" x2="9.51" y2="11.923" width="0.254" layer="1"/>
<wire x1="9.51" y1="11.923" x2="9.51" y2="13.081" width="0.254" layer="1"/>
</signal>
</signals>
</board>
</drawing>
</eagle>

repository: WatSat-ADCS/CAD-tastic

path: /Sensor Data Sheets and Schematics/SparkFun_HMC5883L_Breakout_v12.brd

repo_name: WatSat-ADCS/CAD-tastic

gha_license_id: MIT

gha_language: Eagle

extension: brd


text:
DESCRIPTION = "A set of tools for CD recording"
HOMEPAGE = "http://www.cdrkit.org"
DEPENDS = "libcap2 bzip2"
LICENSE = "GPLv2"

SRC_URI = " \
	http://cdrkit.org/releases/${P}.tar.gz;name=archive \
	file://xconfig.patch \
"

inherit cmake

SRC_URI[archive.md5sum] = "3c25505d567113c269dc6e71640646d8"
SRC_URI[archive.sha256sum] = "8b6e90b4068cac6f3a75a501d7a85aba6583b2dc34f434e3eb62d29104b107e5"

license: MIT

repository: overo/overo-oe-natty

license_type: permissive

repo_name: overo/overo-oe-natty

branch_name: HEAD

extension: bb


text:
package initialization

import (
	"fmt"
	"github.com/jmoiron/sqlx"
	"github.com/labstack/echo"
	"github.com/labstack/echo/middleware"
	"github.com/labstack/gommon/log"
	"github.com/wupeaking/vechainhelper/vechainclient"
	"net/http"
)

var (
	// WebApp web实例
	WebApp *echo.Echo
	// DB 数据实例
	DB *sqlx.DB

	//Version
	Version string
)

// CustomContext 自定义上下文
type CustomContext struct {
	echo.Context
	// 数据库实例
	DB *sqlx.DB
	// vechain 客户端
	BlockClient *vechain.Client
}

// NewDB 新的全局DB
func NewDB() (*sqlx.DB, error) {
	if DB != nil {
		return DB, nil
	}
	// 初始化数据库
	var db *sqlx.DB
	db, err := MySQLInit()
	DB = db
	return DB, err
}

// NewWebApp 新的web实例
func NewWebApp() (*echo.Echo, error) {
	if WebApp != nil {
		return WebApp, nil
	}
	WebApp = echo.New()
	WebApp.HideBanner = true
	WebApp.HTTPErrorHandler = httpErrorHandler
	WebApp.Use(middleware.LoggerWithConfig(middleware.LoggerConfig{
		Format: "[${time_rfc3339}] method=${method} uri=${uri} status=${status} remote_ip=${remote_ip} \n",
	}))
	WebApp.Logger.(*log.Logger).SetHeader(`[${time_rfc3339_nano}] ` +
		`${long_file}@${line}`)
	if Debug {
		WebApp.Logger.SetLevel(log.DEBUG)
	} else {
		WebApp.Logger.SetLevel(log.INFO)
	}

	db, err := NewDB()
	if err != nil {
		WebApp.Logger.Fatal("连接数据库失败: ", err.Error())
		return WebApp, err
	}

	// 创建一个全局客户端
	vc, _ := vechain.NewVeChainClient(RPCAddr, RPCUser, RPCPassword, TimeOut)

	// 使用一个自定义中间件 将db注入上下文中
	WebApp.Use(func(h echo.HandlerFunc) echo.HandlerFunc {
		return func(c echo.Context) error {
			cc := &CustomContext{c, db, vc}
			return h(cc)
		}
	})
	return WebApp, nil
}

func httpErrorHandler(err error, c echo.Context) {
	println("httpErrorHandler======================")
	var (
		code = http.StatusInternalServerError
		msg  interface{}
	)
	if he, ok := err.(*echo.HTTPError); ok {
		code = he.Code
		msg = he.Message
		if he.Internal != nil {
			msg = fmt.Sprintf("%v, %v", err, he.Internal)
		}
	} else if WebApp.Debug {
		msg = err.Error()
	} else {
		msg = http.StatusText(code)
	}

	// Send response
	if !c.Response().Committed {
		if c.Request().Method == echo.HEAD {
			err = c.NoContent(code)
		} else {
			//
			err = c.JSON(200, map[string]string{"code": InternalServerError.ErrCode(), "data": "", "message": msg.(string)})
		}
		if err != nil {
			WebApp.Logger.Error(err)
		}
	}
}

branch_name: refs/heads/master

extension: go


text:
// +build noos

package syscall

const (
	OK Errno = iota
	ENORES
	ENFOUND
	EPERM
	ERANGE
	ENOSYS
)

//emgo:const
var errnos = []string{
	0:       "success",
	ENORES:  "no resources",
	ENFOUND: "not found",
	EPERM:   "no permissions",
	ERANGE:  "out of range",
	ENOSYS:  "function not implemented",
}

repository: ziutek/emgo

repo_name: ziutek/emgo

gha_language: C


text:
using System.Windows.Media.Media3D;
using Palmmedia.WpfGraph.Core;
using Palmmedia.WpfGraph.UI.ViewModels;

namespace Palmmedia.WpfGraph.UI.Interaction
{
    /// <summary>
    /// Interface to enable access to currently displayed graph.
    /// </summary>
    public interface IGraphProvider
    {
        /// <summary>
        /// Gets or sets the graph.
        /// </summary>
        IGraph<NodeData, EdgeData> Graph { get; set; }

        /// <summary>
        /// Gets or sets the currently selected node or edge.
        /// </summary>
        GraphElement<NodeData, EdgeData> SelectedElement { get; set; }

        /// <summary>
        /// Gets or sets the container displaying the graph elements.
        /// </summary>
        ContainerUIElement3D Container { get; set; }
    }
}

repository: bubdm/WpfGraph

repo_name: bubdm/WpfGraph

extension: cs


text:
SET(CRAP_AUDIO_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/audio/include)
IF(LINUX)
  SET(CRAP_AUDIO_LIBRARY crap_audio)
ENDIF(LINUX)

INCLUDE_DIRECTORIES(${CRAP_AUDIO_INCLUDE_DIR})
LINK_DIRECTORIES(${CMAKE_BIN_DIR}/audio/)

repository: dtbinh/crapengine

repo_name: dtbinh/crapengine

extension: cmake


text:
package main

import (
	"bytes"
	"fmt"
	"io/ioutil"
	"k8s.io/client-go/kubernetes/fake"
	"k8s.io/kubernetes/pkg/controller/testutil"

	"github.com/stretchr/testify/require"
	"testing"
)

func TestAppRunOnce(t *testing.T) {
	cmd := newCmd()
	buf := new(bytes.Buffer)
	cmd.SetOutput(buf)

	testgolden := testGoldenFileName(t)

	var testout string
	if *update {
		testout = testgolden
	} else {
		testoutfile, err := ioutil.TempFile("", "testout")
		require.NoError(t, err)
		testout = testoutfile.Name()
		defer UnlinkQuietly(testout)
	}

	err := cmd.ParseFlags([]string{
		"--once",
		fmt.Sprintf("--template=%s:%s", testTemplateName(t), testout),
	})
	require.NoError(t, err)

	cfg, err := newConfig(cmd)
	require.NoError(t, err)

	pod := testutil.NewPod("pod1", "host1")
	fakeClient := fake.NewSimpleClientset(pod)

	stopCh := make(chan struct{})
	doneCh := make(chan struct{})
	defer close(stopCh)
	defer close(doneCh)

	tc, err := newClient(fakeClient, stopCh, false)
	require.NoError(t, err)

	dm := newDependencyManager(tc)

	templates, err := newTemplatesFromConfig(cfg, dm)
	require.NoError(t, err)

	app := &App{
		stopCh:       stopCh,
		doneCh:       doneCh,
		dm:           dm,
		templates:    templates,
		dryRun:       cfg.DryRun,
		updatePeriod: cfg.PollPeriod,
	}

	app.RunOnce()
	actual, err := ioutil.ReadFile(testout)
	require.NoError(t, err)

	expected, err := ioutil.ReadFile(testgolden)
	require.NoError(t, err)
	require.Equal(t, string(expected), string(actual))
}

repository: nbmorgan/kube-template

repo_name: nbmorgan/kube-template


text:
set(MAC_CATALYST TRUE)
message(STATUS "Setting up Catalyst toolchain for IOS_ARCH='${IOS_ARCH}'")
include(${CMAKE_CURRENT_LIST_DIR}/common-ios-toolchain.cmake)
message(STATUS "Catalyst toolchain loaded")

repository: opencv/opencv

repo_name: opencv/opencv


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

namespace Microsoft.Azure.Management.PrivateDns.Fluent
{
    using Microsoft.Azure.Management.PrivateDns.Fluent.Models;
    using Microsoft.Azure.Management.ResourceManager.Fluent.Core;
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Implementation of PrivateDnsZones.
    /// </summary>
    internal class PrivateDnsZonesImpl :
        IPrivateDnsZones
    {
        private readonly PrivateDnsZoneManager manager;
        internal PrivateDnsZonesImpl(PrivateDnsZoneManager privateDnsZoneManager)
        {
            manager = privateDnsZoneManager;
        }

        /// <summary>
        /// Begins a definition for a new resource.
        /// This is the beginning of the builder pattern used to create top level resources
        /// in Azure. The final method completing the definition and starting the actual resource creation
        /// process in Azure is  Creatable.create().
        /// Note that the  Creatable.create() method is
        /// only available at the stage of the resource definition that has the minimum set of input
        /// parameters specified. If you do not see  Creatable.create() among the available methods, it
        /// means you have not yet specified all the required input settings. Input settings generally begin
        /// with the word "with", for example: <code>.withNewResourceGroup()</code> and return the next stage
        /// of the resource definition, as an interface in the "fluent interface" style.
        /// </summary>
        /// <param name="name">The name of the new resource.</param>
        /// <return>The first stage of the new resource definition.</return>
        PrivateDnsZone.Definition.IBlank ResourceManager.Fluent.Core.CollectionActions.ISupportsCreating<PrivateDnsZone.Definition.IBlank>.Define(string name)
        {
            return WrapModel(name);
        }

        /// <summary>
        /// Deletes a private zone from Azure, identifying it by its resource ID.
        /// </summary>
        /// <param name="id">The resource ID of the private zone to delete.</param>
        /// <param name="eTagValue">The ETag value to set on IfMatch header for concurrency protection.</param>
        public void DeleteById(string id, string eTagValue = default(string))
        {
            Extensions.Synchronize(() => DeleteByIdAsync(id, eTagValue, CancellationToken.None));
        }

        /// <summary>
        /// Asynchronously delete a private zone from Azure, identifying it by its resource ID.
        /// </summary>
        /// <param name="id">The resource ID of the private zone to delete.</param>
        /// <param name="eTagValue">The ETag value to set on IfMatch header for concurrency protection.</param>
        /// <return>A representation of the deferred computation this delete call.</return>
        public async Task DeleteByIdAsync(string id, string eTagValue = default(string), CancellationToken cancellationToken = default(CancellationToken))
        {
            await DeleteByResourceGroupNameAsync(
                ResourceUtils.GroupFromResourceId(id),
                ResourceUtils.NameFromResourceId(id),
                eTagValue,
                cancellationToken);
        }

        /// <summary>
        /// Deletes the zone from Azure, identifying it by its name and its resource group.
        /// </summary>
        /// <param name="resourceGroupName">The resource group the resource is part of.</param>
        /// <param name="privateZoneName">The name of the private zone.</param>
        /// <param name="eTagValue">The ETag value to set on IfMatch header for concurrency protection.</param>
        public void DeleteByResourceGroupName(string resourceGroupName, string privateZoneName, string eTagValue = default(string))
        {
            Extensions.Synchronize(() => DeleteByResourceGroupNameAsync(resourceGroupName, privateZoneName, eTagValue, CancellationToken.None));
        }

        /// <summary>
        /// Deletes the zone from Azure, identifying it by its name and its resource group asynchronously.
        /// </summary>
        /// <param name="resourceGroupName">The resource group the resource is part of.</param>
        /// <param name="privateZoneName">The name of the private zone.</param>
        /// <param name="eTagValue">The ETag value to set on IfMatch header for concurrency protection.</param>
        /// <return>A representation of the deferred computation this delete call.</return>
        public async Task DeleteByResourceGroupNameAsync(string resourceGroupName, string privateZoneName, string eTagValue = default(string), CancellationToken cancellationToken = default(CancellationToken))
        {
            await manager.Inner.PrivateZones.DeleteAsync(resourceGroupName, privateZoneName, eTagValue, cancellationToken);
        }

        /// <summary>
        /// Gets a private DNS zone by its ID.
        /// </summary>
        /// <param name="id">The resource ID of the private DNS zone.</param>
        /// <return>The private zone</return>
        public IPrivateDnsZone GetById(string id)
        {
            return Extensions.Synchronize(() => GetByIdAsync(id, CancellationToken.None));
        }

        /// <summary>
        /// Gets a private DNS zone by its ID asynchronously.
        /// </summary>
        /// <param name="id">The resource ID of the private DNS zone.</param>
        /// <return>The private zone</return>
        public async Task<IPrivateDnsZone> GetByIdAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
        {
            var inner = await manager.Inner.PrivateZones.GetAsync(
                    ResourceUtils.GroupFromResourceId(id),
                    ResourceUtils.NameFromResourceId(id),
                    cancellationToken);
            return inner == null ? null : WrapModel(inner);
        }

        /// <summary>
        /// Gets a private DNS zone by the resource group name it belongs to and its name.
        /// </summary>
        /// <param name="resourceGroupName">The resource group name it belongs to.</param>
        /// <param name="name">The name of the private DNS zone.</param>
        /// <return>The private zone</return>
        public IPrivateDnsZone GetByResourceGroup(string resourceGroupName, string name)
        {
            return Extensions.Synchronize(() => GetByResourceGroupAsync(resourceGroupName, name, CancellationToken.None));
        }

        /// <summary>
        /// Gets a private DNS zone by the resource group name it belongs to and its name asynchronously.
        /// </summary>
        /// <param name="resourceGroupName">The resource group name it belongs to.</param>
        /// <param name="name">The name of the private DNS zone.</param>
        /// <return>The private zone</return>
        public async Task<IPrivateDnsZone> GetByResourceGroupAsync(string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken))
        {
            var inner = await manager.Inner.PrivateZones.GetAsync(resourceGroupName, name, cancellationToken);
            return inner == null ? null : WrapModel(inner);
        }

        /// <summary>
        /// Lists all the private zones in the currently selected subscription.
        /// </summary>
        /// <param name="pageSize">The maximum number of record sets in a page.</param>
        /// <return>The private zones</return>
        public IEnumerable<IPrivateDnsZone> List(int? pageSize = default(int?))
        {
            return Extensions.Synchronize(() => ListAsync(pageSize, pageSize == null, CancellationToken.None));
        }

        /// <summary>
        /// Lists all the private zones in the currently selected subscription asynchronously.
        /// </summary>
        /// <param name="pageSize">The maximum number of record sets in a page.</param>
        /// <return>The private zones</return>
        public async Task<IPagedCollection<IPrivateDnsZone>> ListAsync(int? pageSize = default(int?), bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            return await PagedCollection<IPrivateDnsZone, PrivateZoneInner>.LoadPage(
                async (cancellation) => await manager.Inner.PrivateZones.ListAsync(pageSize, cancellationToken),
                manager.Inner.PrivateZones.ListNextAsync,
                WrapModel,
                loadAllPages,
                cancellationToken);
        }

        /// <summary>
        /// Lists all the private zones, identifying it by its name and its resource group.
        /// </summary>
        /// <param name="resourceGroupName">The resource group the resource is part of.</param>
        /// <param name="pageSize">The maximum number of record sets in a page.</param>
        /// <return>The private zones</return>
        public IEnumerable<IPrivateDnsZone> ListByResourceGroup(string resourceGroupName, int? pageSize = default(int?))
        {
            return Extensions.Synchronize(() => ListByResourceGroupAsync(resourceGroupName, pageSize, pageSize == null, CancellationToken.None));
        }

        /// <summary>
        /// Lists all the private zones, identifying it by its name and its resource group asynchronously.
        /// </summary>
        /// <param name="resourceGroupName">The resource group the resource is part of.</param>
        /// <param name="pageSize">The maximum number of record sets in a page.</param>
        /// <return>The private zones</return>
        public async Task<IPagedCollection<IPrivateDnsZone>> ListByResourceGroupAsync(string resourceGroupName, int? pageSize = default(int?), bool loadAllPages = true, CancellationToken cancellationToken = default(CancellationToken))
        {
            return await PagedCollection<IPrivateDnsZone, PrivateZoneInner>.LoadPage(
                async(cancellation) => await manager.Inner.PrivateZones.ListByResourceGroupAsync(resourceGroupName, pageSize, cancellation),
                manager.Inner.PrivateZones.ListByResourceGroupNextAsync,
                WrapModel,
                loadAllPages,
                cancellationToken);
        }

        IPrivateDnsZoneManager IHasManager<IPrivateDnsZoneManager>.Manager
        {
            get
            {
                return manager;
            }
        }

        IPrivateZonesOperations IHasInner<IPrivateZonesOperations>.Inner
        {
            get
            {
                return manager.Inner.PrivateZones;
            }
        }

        protected PrivateDnsZoneImpl WrapModel(string name)
        {
            return WrapModel(new PrivateZoneInner(name: name, location:"global"));
        }

        protected PrivateDnsZoneImpl WrapModel(PrivateZoneInner inner)
        {
            return new PrivateDnsZoneImpl(inner.Name, inner, manager);
        }
    }
}

repository: Azure/azure-libraries-for-net

repo_name: Azure/azure-libraries-for-net

gha_language: C#