chore: restructure link paths
|
|
@ -1,9 +0,0 @@
|
||||||
# Eólas
|
|
||||||
|
|
||||||
> Eólas is Irish for knowledge or information, especially knowledge gained by
|
|
||||||
> experience or practice
|
|
||||||
|
|
||||||
This repository contains notes from my autodidactic study of software
|
|
||||||
engineering and computer science. <a href="https://notbyai.fyi/">
|
|
||||||
|
|
||||||
</a>
|
|
||||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB |
BIN
_img/DMUX.png
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 68 KiB |
BIN
_img/LMC_5.gif
|
Before Width: | Height: | Size: 6.9 MiB |
BIN
_img/MUX.png
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 312 KiB |
BIN
_img/ORelim1.png
|
Before Width: | Height: | Size: 31 KiB |
BIN
_img/ORelim2.png
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 724 KiB |
|
Before Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 3.6 MiB |
|
Before Width: | Height: | Size: 20 KiB |
|
|
@ -1,38 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Copyright 2017 mathsisfun.com -->
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="360" height="160.5" version="1.1" style="font-family:'Comic Sans MS'; font-size:11.9px; fill:#0065a4; stroke-width:1px;">
|
|
||||||
<defs/>
|
|
||||||
<g transform="translate(-132.996,-941.117)">
|
|
||||||
<path transform="translate(132.996,941.117)" style="fill:none; stroke:#ef2929; stroke-width:1.31;" d="M 0.5 82.4 C 0.5 82.4 19.9 106.5 37.1 112.7 C 54.4 119 64 121.2 84.4 117.2 C 104.8 113.2 118.9 101.2 128.9 87.3 C 138.9 73.5 169.9 13.5 198.8 10.4 C 216.5 8.4 232.3 31.3 246.8 58.9 "/>
|
|
||||||
<rect x="262.6" y="1012" width="15.9" height="9.2" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.67;"/>
|
|
||||||
<rect x="328.5" y="952.8" width="15.9" height="68.5" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="394.4" y="-1051.2" width="15.9" height="29.9" transform="scale(1,-1)" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="344.9" y="962.1" width="15.9" height="59.1" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="361.4" y="984.1" width="15.9" height="37.2" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="312" y="955.6" width="15.9" height="65.6" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="295.5" y="968.4" width="15.9" height="52.8" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="279" y="988.6" width="15.9" height="32.7" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.7;"/>
|
|
||||||
<rect x="377.9" y="1014.5" width="15.9" height="7" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.76;"/>
|
|
||||||
<rect x="410.8" y="-1079.7" width="15.9" height="58.4" transform="scale(1,-1)" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="427.3" y="-1088.9" width="15.9" height="67.7" transform="scale(1,-1)" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="443.8" y="-1071.1" width="15.9" height="49.8" transform="scale(1,-1)" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="460.3" y="-1032.4" width="15.9" height="11.1" transform="scale(1,-1)" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<rect x="476.7" y="990.6" width="15.9" height="30.7" style="fill:#19aeff; fill-opacity:0.17; stroke:#007ad2; stroke-width:0.69;"/>
|
|
||||||
<text x="264.1" y="1009.2" transform="scale(0.999821,1.00018)">12</text>
|
|
||||||
<text x="329.5" y="949.9" transform="scale(0.999821,1.00018)">82</text>
|
|
||||||
<text x="313.1" y="953.8" transform="scale(0.999821,1.00018)">78</text>
|
|
||||||
<text x="295.8" y="965.1" transform="scale(0.999822,1.00018)">63</text>
|
|
||||||
<text x="278.6" y="986" transform="scale(0.999822,1.00018)">39</text>
|
|
||||||
<text x="345.5" y="959.9" transform="scale(0.999821,1.00018)">70</text>
|
|
||||||
<text x="362.7" y="982.8" transform="scale(0.999821,1.00018)">44</text>
|
|
||||||
<text x="382" y="1010.9" transform="scale(0.999821,1.00018)">9</text>
|
|
||||||
<text x="390.8" y="1061.8" transform="scale(0.999822,1.00018)">-36</text>
|
|
||||||
<text x="406" y="1092" transform="scale(0.999822,1.00018)">-69</text>
|
|
||||||
<text x="425.7" y="1100.9" transform="scale(0.999821,1.00018)">-80</text>
|
|
||||||
<text x="443.4" y="1080.6" transform="scale(0.999821,1.00018)">-59</text>
|
|
||||||
<text x="462.2" y="1043.4" transform="scale(0.999822,1.00018)">-14</text>
|
|
||||||
<text x="477.6" y="988.3" transform="scale(0.999822,1.00018)">42</text>
|
|
||||||
<text x="160.8" y="1038.9" transform="scale(0.999822,1.00018)" style="font-family:Verdana; font-size:22.7px; fill:#ef2929;">Analog</text>
|
|
||||||
<text x="393.6" y="984.4" transform="scale(0.999822,1.00018)" style="font-family:Verdana; font-size:22.7px;">Digital</text>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 91 KiB |
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- Do not edit this file with editors other than diagrams.net -->
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="351px" height="100px" viewBox="-0.5 -0.5 351 100" content="<mxfile host="app.diagrams.net" modified="2022-01-28T16:40:19.569Z" agent="5.0 (Windows)" etag="79nfJ7VIocRGYK2v8O42" version="16.5.1" type="github"><diagram id="E9uSWFrlHMG1s9rWNVgx" name="Page-1">3VhNc9owEP01HNNBkm2cYyAknU477QyHpkdhL7ZSYRFZBMivr2TJXxgImRLyQQ5on3ZX0tvVc0yPjObrW0kX6Q8RA+/hfrzukesexsjzsf4yyMYiQYAskEgWO6camLAncGDfoUsWQ95yVEJwxRZtMBJZBpFqYVRKsWq7zQRvr7qgCXSASUR5F/3NYpVaNMSDGv8KLEnLlVFwaWfmtHR2J8lTGotVAyLjHhlJIZQdzdcj4Ia8khcbd7NnttqYhEwdEzB5+DZI89vh/OfkcnY3vvDvcXbhNvtI+dId2G1WbUoGpFhmMZgk/R4ZrlKmYLKgkZld6ZprLFVzri2khzPG+UhwIYtYMvPNn8ZzJcVfaMwExcdEiEw1cPvRuNsYSAXrvSdGFY+6AUHMQcmNdikDBo5613voMrD2qq6k71zSZhEdRl3vJFXmml49cAy/gG30qdnG74zt6uLV7EKsL7czhVSpSERG+bhGh23+a5/vQiwc6/eg1MYpFV0q0a4JrJm6M+FffGf9acxcr13mwtiURqbP2wgyZhVljDqssOq4+MponDYzkYFFbpihqZjv9EGIp6ToAztTKhru9lLsQxh7VWcY4g73heZZLGUEhwri9JvKBNQBv8HuPpPAqWKP7X3s6poiVBNDNw2HhWCZyhuZfxlgv1hgb0tOt/xJ4B/y1wO7g7p/q6P8R0s/LyA6i342wsvFI4wginY1zTT0Pb9/IpEItkUCdUQC7xAJ/FoiQc4kyfuEd79Un4BtTN6bJKMOu+eQ5HPJaxCFMJ0dJa8Uwll0Wnn1jpRXhN9CX3WntfUSBwf11fP6h/xfR1+9j66vGLVZfnN9HXxmfSX+8/pKzqmv4Q62A65XHcbs0SzIWZIVE8HD0rx4DjnMVG3pUWK+ab7JolSKTCzzMoPeUJHEenSqqFlU7VKVixVLkKFhmukX6ysHz1kcW32HnD3RaZHIdIBTEp3VH/b8a5NJS3pu1R11auqkudkYJaR7ony0oBOUu/OG45FOuVH/nLcLHfEP4ce9Xh56/noFp7le2qx/ibFPk/r3LDL+Bw==</diagram></mxfile>"><defs/><g><rect x="50" y="53" width="50" height="10" fill="#f5f5f5" stroke="#666666" pointer-events="all"/><rect x="0" y="53" width="50" height="10" fill="#f5f5f5" stroke="#666666" pointer-events="all"/><path d="M 50 68 L 50 97.06 L 245.06 97.06 L 245 63" fill="none" stroke="#82b366" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="50" cy="58" rx="10" ry="10" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><rect x="110" y="53" width="50" height="10" fill="#f5f5f5" stroke="#666666" pointer-events="all"/><path d="M 105 68 L 105.06 82.94 L 320 82.94 L 320 63" fill="none" stroke="#6c8ebf" stroke-width="2" stroke-miterlimit="10" pointer-events="stroke"/><ellipse cx="105" cy="58" rx="10" ry="10" fill="#f8cecc" stroke="#b85450" pointer-events="all"/><rect x="230" y="53" width="30" height="10" fill="#f5f5f5" stroke="#666666" pointer-events="all"/><rect x="0" y="0" width="100" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width: 1px; height: 1px; padding-top: 10px; margin-left: 2px;"><div style="box-sizing: border-box; font-size: 0px; text-align: left;" data-drawio-colors="color: rgb(0, 0, 0); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight: bold; white-space: nowrap;"><div align="left">asynchronous</div></div></div></div></foreignObject><text x="2" y="14" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" font-weight="bold">asynchronous</text></switch></g><rect x="290" y="53" width="60" height="10" fill="#f5f5f5" stroke="#666666" pointer-events="all"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
|
|
||||||
|
Before Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 9 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 201 KiB |
|
Before Width: | Height: | Size: 175 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
_img/diode.png
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 155 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 26 KiB |
BIN
_img/em-wave.gif
|
Before Width: | Height: | Size: 848 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 171 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 20 KiB |
BIN
_img/grub.jpg
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 29 KiB |
BIN
_img/htop.png
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 167 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 24 KiB |
BIN
_img/lsof.png
|
Before Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 190 KiB |
|
Before Width: | Height: | Size: 9 KiB |
|
Before Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 668 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
|
@ -1,689 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
width="167.85909mm"
|
|
||||||
height="84.399048mm"
|
|
||||||
viewBox="0 0 167.85909 84.399048"
|
|
||||||
version="1.1"
|
|
||||||
id="svg1594"
|
|
||||||
sodipodi:docname="parallel-battery-diagram.svg"
|
|
||||||
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
|
||||||
inkscape:export-filename="parallel-batt2.svg"
|
|
||||||
inkscape:export-xdpi="96"
|
|
||||||
inkscape:export-ydpi="96"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview1596"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#eeeeee"
|
|
||||||
borderopacity="1"
|
|
||||||
inkscape:showpageshadow="0"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#505050"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
showgrid="false"
|
|
||||||
showguides="true"
|
|
||||||
inkscape:zoom="3.9408307"
|
|
||||||
inkscape:cx="505.85782"
|
|
||||||
inkscape:cy="236.62524"
|
|
||||||
inkscape:window-width="2346"
|
|
||||||
inkscape:window-height="944"
|
|
||||||
inkscape:window-x="26"
|
|
||||||
inkscape:window-y="23"
|
|
||||||
inkscape:window-maximized="0"
|
|
||||||
inkscape:current-layer="layer1">
|
|
||||||
<inkscape:grid
|
|
||||||
type="xygrid"
|
|
||||||
id="grid7029"
|
|
||||||
originx="-11.038969"
|
|
||||||
originy="-84.518999" />
|
|
||||||
</sodipodi:namedview>
|
|
||||||
<defs
|
|
||||||
id="defs1591">
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="Dot"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto"
|
|
||||||
inkscape:stockid="Dot"
|
|
||||||
markerWidth="3.6670001"
|
|
||||||
markerHeight="3.6670001"
|
|
||||||
viewBox="0 0 5.6666667 5.6666667"
|
|
||||||
inkscape:isstock="true"
|
|
||||||
inkscape:collect="always"
|
|
||||||
preserveAspectRatio="xMidYMid">
|
|
||||||
<path
|
|
||||||
transform="scale(0.5)"
|
|
||||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
|
||||||
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
|
||||||
id="Dot1"
|
|
||||||
sodipodi:nodetypes="sssss" />
|
|
||||||
</marker>
|
|
||||||
<inkscape:perspective
|
|
||||||
sodipodi:type="inkscape:persp3d"
|
|
||||||
inkscape:vp_x="0 : -64.100957 : 1"
|
|
||||||
inkscape:vp_y="0 : 999.99998 : 0"
|
|
||||||
inkscape:vp_z="210.00001 : -64.100957 : 1"
|
|
||||||
inkscape:persp3d-origin="105.00001 : -113.60095 : 1"
|
|
||||||
id="perspective1773" />
|
|
||||||
</defs>
|
|
||||||
<g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1"
|
|
||||||
transform="translate(-11.038969,-84.519)">
|
|
||||||
<rect
|
|
||||||
style="fill:#f2f2f2;fill-opacity:1;stroke:#000000;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect11490"
|
|
||||||
width="167.25908"
|
|
||||||
height="83.799049"
|
|
||||||
x="11.338969"
|
|
||||||
y="84.819"
|
|
||||||
rx="0"
|
|
||||||
ry="0" />
|
|
||||||
<g
|
|
||||||
id="g5763"
|
|
||||||
transform="matrix(1,0,0,0.88297298,0,12.476157)"
|
|
||||||
style="stroke-width:1.06421">
|
|
||||||
<g
|
|
||||||
id="g5561"
|
|
||||||
style="stroke-width:0.638524;stroke-dasharray:none">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect1831"
|
|
||||||
width="29.184156"
|
|
||||||
height="42.17189"
|
|
||||||
x="36.551899"
|
|
||||||
y="107.70461"
|
|
||||||
rx="15.868324"
|
|
||||||
ry="5.9747577" />
|
|
||||||
<ellipse
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="path1889"
|
|
||||||
cx="51.225346"
|
|
||||||
cy="111.95552"
|
|
||||||
rx="14.632196"
|
|
||||||
ry="4.1182208" />
|
|
||||||
<ellipse
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="path1889-9"
|
|
||||||
cx="51.205845"
|
|
||||||
cy="110.72742"
|
|
||||||
rx="14.536783"
|
|
||||||
ry="4.1182208" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="47.560608"
|
|
||||||
y="129.51152"
|
|
||||||
id="text2052"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:0.131"
|
|
||||||
x="47.560608"
|
|
||||||
y="129.51152">1.5 V</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="53.336403"
|
|
||||||
y="103.73036"
|
|
||||||
id="text2052-9"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-4"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-opacity:1"
|
|
||||||
x="53.336403"
|
|
||||||
y="103.73036">+</tspan></text>
|
|
||||||
<g
|
|
||||||
id="g5763-1"
|
|
||||||
transform="matrix(1,0,0,0.88297298,79.433769,12.520703)"
|
|
||||||
style="stroke-width:1.06421">
|
|
||||||
<g
|
|
||||||
id="g5561-7"
|
|
||||||
style="stroke-width:0.638524;stroke-dasharray:none">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect1831-7"
|
|
||||||
width="29.184156"
|
|
||||||
height="42.17189"
|
|
||||||
x="36.551899"
|
|
||||||
y="107.70461"
|
|
||||||
rx="15.868324"
|
|
||||||
ry="5.9747577" />
|
|
||||||
<ellipse
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="path1889-1"
|
|
||||||
cx="51.225346"
|
|
||||||
cy="111.95552"
|
|
||||||
rx="14.632196"
|
|
||||||
ry="4.1182208" />
|
|
||||||
<ellipse
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="path1889-9-1"
|
|
||||||
cx="51.205845"
|
|
||||||
cy="110.72742"
|
|
||||||
rx="14.536783"
|
|
||||||
ry="4.1182208" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="126.99438"
|
|
||||||
y="129.55606"
|
|
||||||
id="text2052-0"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-9"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:0.131"
|
|
||||||
x="126.99438"
|
|
||||||
y="129.55606">1.5 V</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="123.43864"
|
|
||||||
y="95.87645"
|
|
||||||
id="text2052-0-6"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-9-9"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:0.131"
|
|
||||||
x="123.43864"
|
|
||||||
y="95.87645">1.5 V</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="134.7086"
|
|
||||||
y="98.829781"
|
|
||||||
id="text2052-9-9-8"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-4-0-5"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#0000ff;stroke:none;stroke-width:0.131"
|
|
||||||
x="134.7086"
|
|
||||||
y="98.829781">-</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="100.20913"
|
|
||||||
y="122.68433"
|
|
||||||
id="text2052-9-9-8-2"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-4-0-5-5"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke:none;stroke-width:0.131"
|
|
||||||
x="100.20913"
|
|
||||||
y="122.68433">-</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="60.020687"
|
|
||||||
y="104.97092"
|
|
||||||
id="text2052-9-9-8-4"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-4-0-5-0"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke:none;stroke-width:0.131"
|
|
||||||
x="60.020687"
|
|
||||||
y="104.97092">-</tspan></text>
|
|
||||||
<g
|
|
||||||
id="g5763-11"
|
|
||||||
transform="matrix(1,0,0,0.88297298,40.19319,29.941962)"
|
|
||||||
style="stroke-width:1.06421">
|
|
||||||
<g
|
|
||||||
id="g5561-5"
|
|
||||||
style="stroke-width:0.638524;stroke-dasharray:none">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect1831-9"
|
|
||||||
width="29.184156"
|
|
||||||
height="42.17189"
|
|
||||||
x="36.551899"
|
|
||||||
y="107.70461"
|
|
||||||
rx="15.868324"
|
|
||||||
ry="5.9747577" />
|
|
||||||
<ellipse
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="path1889-8"
|
|
||||||
cx="51.225346"
|
|
||||||
cy="111.95552"
|
|
||||||
rx="14.632196"
|
|
||||||
ry="4.1182208" />
|
|
||||||
<ellipse
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.638524;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="path1889-9-4"
|
|
||||||
cx="51.205845"
|
|
||||||
cy="110.72742"
|
|
||||||
rx="14.536783"
|
|
||||||
ry="4.1182208" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="87.753799"
|
|
||||||
y="146.97733"
|
|
||||||
id="text2052-1"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-8"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:0.131"
|
|
||||||
x="87.753799"
|
|
||||||
y="146.97733">1.5 V</tspan></text>
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#d40000;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 54.208389,109.75179 c 12.446443,5.3942 16.496376,8.26753 20.771904,12.94608 7.48606,8.19171 18.593709,4.01613 18.593709,4.01613"
|
|
||||||
id="path9813"
|
|
||||||
sodipodi:nodetypes="csc" />
|
|
||||||
<g
|
|
||||||
id="g5670-4"
|
|
||||||
transform="translate(-23.391324,1.6043599)">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect2368-8-7"
|
|
||||||
width="4.62432"
|
|
||||||
height="5.5953016"
|
|
||||||
x="75.821289"
|
|
||||||
y="102.56096"
|
|
||||||
rx="2.4116266"
|
|
||||||
ry="0.74982649" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect5296-9-8"
|
|
||||||
width="4.5780368"
|
|
||||||
height="1.0768906"
|
|
||||||
x="75.832077"
|
|
||||||
y="102.5574"
|
|
||||||
rx="2.4116263"
|
|
||||||
ry="2.4116263" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.297111,103.46708 c -0.0043,4.34346 -0.01896,4.32759 -0.01896,4.32759"
|
|
||||||
id="path5355-7-4" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.890223,103.65618 c -0.0043,4.34344 -0.01896,4.32758 -0.01896,4.32758"
|
|
||||||
id="path5355-0-3-5" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.451286,103.71402 c -0.0043,4.38827 -0.01896,4.37224 -0.01896,4.37224"
|
|
||||||
id="path5355-0-2-6-0" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.989636,103.71983 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-1-3" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 78.576586,103.71312 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-7-2-6" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.133333,103.69821 c -0.0043,4.35162 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-93-1" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.64944,103.60865 c -0.0043,4.35163 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-9-1-0" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 80.08699,103.47617 c -0.0043,4.35163 -0.01896,4.33574 -0.01896,4.33574"
|
|
||||||
id="path5355-0-2-3-7-5-9-2-9-6" />
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#d40000;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot)"
|
|
||||||
d="m 95.775941,127.05899 c 7.421559,4.76267 17.036309,2.97123 22.173259,1.46484 23.3666,-6.85216 14.97722,-30.962889 9.38445,-29.181746"
|
|
||||||
id="path10059"
|
|
||||||
sodipodi:nodetypes="csc" />
|
|
||||||
<g
|
|
||||||
id="g5670-4-1"
|
|
||||||
transform="translate(16.801866,19.070165)">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect2368-8-7-7"
|
|
||||||
width="4.62432"
|
|
||||||
height="5.5953016"
|
|
||||||
x="75.821289"
|
|
||||||
y="102.56096"
|
|
||||||
rx="2.4116266"
|
|
||||||
ry="0.74982649" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect5296-9-8-5"
|
|
||||||
width="4.5780368"
|
|
||||||
height="1.0768906"
|
|
||||||
x="75.832077"
|
|
||||||
y="102.5574"
|
|
||||||
rx="2.4116263"
|
|
||||||
ry="2.4116263" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.297111,103.46708 c -0.0043,4.34346 -0.01896,4.32759 -0.01896,4.32759"
|
|
||||||
id="path5355-7-4-9" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.890223,103.65618 c -0.0043,4.34344 -0.01896,4.32758 -0.01896,4.32758"
|
|
||||||
id="path5355-0-3-5-6" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.451286,103.71402 c -0.0043,4.38827 -0.01896,4.37224 -0.01896,4.37224"
|
|
||||||
id="path5355-0-2-6-0-2" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.989636,103.71983 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-1-3-1" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 78.576586,103.71312 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-7-2-6-7" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.133333,103.69821 c -0.0043,4.35162 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-93-1-85" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.64944,103.60865 c -0.0043,4.35163 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-9-1-0-7" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 80.08699,103.47617 c -0.0043,4.35163 -0.01896,4.33574 -0.01896,4.33574"
|
|
||||||
id="path5355-0-2-3-7-5-9-2-9-6-4" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
id="g5670-4-4"
|
|
||||||
transform="translate(56.042445,1.6489057)">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect2368-8-7-8"
|
|
||||||
width="4.62432"
|
|
||||||
height="5.5953016"
|
|
||||||
x="75.821289"
|
|
||||||
y="102.56096"
|
|
||||||
rx="2.4116266"
|
|
||||||
ry="0.74982649" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect5296-9-8-1"
|
|
||||||
width="4.5780368"
|
|
||||||
height="1.0768906"
|
|
||||||
x="75.832077"
|
|
||||||
y="102.5574"
|
|
||||||
rx="2.4116263"
|
|
||||||
ry="2.4116263" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.297111,103.46708 c -0.0043,4.34346 -0.01896,4.32759 -0.01896,4.32759"
|
|
||||||
id="path5355-7-4-2" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.890223,103.65618 c -0.0043,4.34344 -0.01896,4.32758 -0.01896,4.32758"
|
|
||||||
id="path5355-0-3-5-9" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.451286,103.71402 c -0.0043,4.38827 -0.01896,4.37224 -0.01896,4.37224"
|
|
||||||
id="path5355-0-2-6-0-3" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.989636,103.71983 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-1-3-9" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 78.576586,103.71312 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-7-2-6-0" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.133333,103.69821 c -0.0043,4.35162 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-93-1-8" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.64944,103.60865 c -0.0043,4.35163 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-9-1-0-8" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 80.08699,103.47617 c -0.0043,4.35163 -0.01896,4.33574 -0.01896,4.33574"
|
|
||||||
id="path5355-0-2-3-7-5-9-2-9-6-5" />
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#1100cb;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="m 61.628334,110.67362 c 4.092734,12.58375 11.925523,16.26868 15.744737,21.51224 8.833664,12.12812 25.223209,-4.24691 25.582969,-4.69682"
|
|
||||||
id="path10094"
|
|
||||||
sodipodi:nodetypes="csc" />
|
|
||||||
<g
|
|
||||||
id="g5670"
|
|
||||||
transform="translate(-17.161725,2.6692588)">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect2368-8"
|
|
||||||
width="4.62432"
|
|
||||||
height="5.5953016"
|
|
||||||
x="75.821289"
|
|
||||||
y="102.56096"
|
|
||||||
rx="2.4116266"
|
|
||||||
ry="0.74982649" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect5296-9"
|
|
||||||
width="4.5780368"
|
|
||||||
height="1.0768906"
|
|
||||||
x="75.832077"
|
|
||||||
y="102.5574"
|
|
||||||
rx="2.4116263"
|
|
||||||
ry="2.4116263" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.297111,103.46708 c -0.0043,4.34346 -0.01896,4.32759 -0.01896,4.32759"
|
|
||||||
id="path5355-7" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.890223,103.65618 c -0.0043,4.34344 -0.01896,4.32758 -0.01896,4.32758"
|
|
||||||
id="path5355-0-3" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.451286,103.71402 c -0.0043,4.38827 -0.01896,4.37224 -0.01896,4.37224"
|
|
||||||
id="path5355-0-2-6" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.989636,103.71983 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-1" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 78.576586,103.71312 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-7-2" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.133333,103.69821 c -0.0043,4.35162 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-93" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.64944,103.60865 c -0.0043,4.35163 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-9-1" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 80.08699,103.47617 c -0.0043,4.35163 -0.01896,4.33574 -0.01896,4.33574"
|
|
||||||
id="path5355-0-2-3-7-5-9-2-9" />
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#1100cb;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Dot)"
|
|
||||||
d="m 101.38431,127.85411 c 6.14872,-2.76259 24.75068,-6.24215 29.54869,-6.4841 21.05827,-1.06189 6.53711,-22.349141 1.9878,-23.262611"
|
|
||||||
id="path10876"
|
|
||||||
sodipodi:nodetypes="csc" />
|
|
||||||
<g
|
|
||||||
id="g5670-8"
|
|
||||||
transform="translate(23.031465,20.135064)">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect2368-8-1"
|
|
||||||
width="4.62432"
|
|
||||||
height="5.5953016"
|
|
||||||
x="75.821289"
|
|
||||||
y="102.56096"
|
|
||||||
rx="2.4116266"
|
|
||||||
ry="0.74982649" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect5296-9-0"
|
|
||||||
width="4.5780368"
|
|
||||||
height="1.0768906"
|
|
||||||
x="75.832077"
|
|
||||||
y="102.5574"
|
|
||||||
rx="2.4116263"
|
|
||||||
ry="2.4116263" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.297111,103.46708 c -0.0043,4.34346 -0.01896,4.32759 -0.01896,4.32759"
|
|
||||||
id="path5355-7-3" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.890223,103.65618 c -0.0043,4.34344 -0.01896,4.32758 -0.01896,4.32758"
|
|
||||||
id="path5355-0-3-0" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.451286,103.71402 c -0.0043,4.38827 -0.01896,4.37224 -0.01896,4.37224"
|
|
||||||
id="path5355-0-2-6-4" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.989636,103.71983 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-1-4" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 78.576586,103.71312 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-7-2-4" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.133333,103.69821 c -0.0043,4.35162 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-93-4" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.64944,103.60865 c -0.0043,4.35163 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-9-1-7" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 80.08699,103.47617 c -0.0043,4.35163 -0.01896,4.33574 -0.01896,4.33574"
|
|
||||||
id="path5355-0-2-3-7-5-9-2-9-63" />
|
|
||||||
</g>
|
|
||||||
<g
|
|
||||||
id="g5670-5"
|
|
||||||
transform="translate(62.272044,2.7138047)">
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect2368-8-9"
|
|
||||||
width="4.62432"
|
|
||||||
height="5.5953016"
|
|
||||||
x="75.821289"
|
|
||||||
y="102.56096"
|
|
||||||
rx="2.4116266"
|
|
||||||
ry="0.74982649" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
id="rect5296-9-7"
|
|
||||||
width="4.5780368"
|
|
||||||
height="1.0768906"
|
|
||||||
x="75.832077"
|
|
||||||
y="102.5574"
|
|
||||||
rx="2.4116263"
|
|
||||||
ry="2.4116263" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.297111,103.46708 c -0.0043,4.34346 -0.01896,4.32759 -0.01896,4.32759"
|
|
||||||
id="path5355-7-7" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 76.890223,103.65618 c -0.0043,4.34344 -0.01896,4.32758 -0.01896,4.32758"
|
|
||||||
id="path5355-0-3-6" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.451286,103.71402 c -0.0043,4.38827 -0.01896,4.37224 -0.01896,4.37224"
|
|
||||||
id="path5355-0-2-6-7" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 77.989636,103.71983 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-1-36" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 78.576586,103.71312 c -0.0043,4.43657 -0.01896,4.42036 -0.01896,4.42036"
|
|
||||||
id="path5355-0-2-3-7-2-5" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.133333,103.69821 c -0.0043,4.35162 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-93-6" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 79.64944,103.60865 c -0.0043,4.35163 -0.01896,4.33573 -0.01896,4.33573"
|
|
||||||
id="path5355-0-2-3-7-5-9-1-3" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.231;stroke-linecap:square;stroke-dasharray:none"
|
|
||||||
d="m 80.08699,103.47617 c -0.0043,4.35163 -0.01896,4.33574 -0.01896,4.33574"
|
|
||||||
id="path5355-0-2-3-7-5-9-2-9-9" />
|
|
||||||
</g>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="93.286148"
|
|
||||||
y="120.80184"
|
|
||||||
id="text2052-9-3"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-4-03"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-opacity:1"
|
|
||||||
x="93.286148"
|
|
||||||
y="120.80184">+</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="139.54593"
|
|
||||||
y="105.43155"
|
|
||||||
id="text2052-9-9-8-2-2"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-4-0-5-5-2"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke:none;stroke-width:0.131"
|
|
||||||
x="139.54593"
|
|
||||||
y="105.43155">-</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="132.62296"
|
|
||||||
y="103.54906"
|
|
||||||
id="text2052-9-3-4"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-4-03-7"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-opacity:1"
|
|
||||||
x="132.62296"
|
|
||||||
y="103.54906">+</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#d20000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="122.45236"
|
|
||||||
y="100.51137"
|
|
||||||
id="text2052-9-0"><tspan
|
|
||||||
sodipodi:role="line"
|
|
||||||
id="tspan2050-4-9"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#d20000;fill-opacity:1;stroke:none;stroke-width:0.131;stroke-opacity:1"
|
|
||||||
x="122.45236"
|
|
||||||
y="100.51137">+</tspan></text>
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="path11212"
|
|
||||||
sodipodi:type="arc"
|
|
||||||
sodipodi:cx="132.90474"
|
|
||||||
sodipodi:cy="98.110756"
|
|
||||||
sodipodi:rx="0.79117769"
|
|
||||||
sodipodi:ry="0.82409161"
|
|
||||||
sodipodi:start="0"
|
|
||||||
sodipodi:end="6.009063"
|
|
||||||
sodipodi:open="true"
|
|
||||||
sodipodi:arc-type="arc"
|
|
||||||
d="m 133.69592,98.110756 a 0.79117769,0.82409161 0 0 1 -0.737,0.822157 0.79117769,0.82409161 0 0 1 -0.83794,-0.709559 0.79117769,0.82409161 0 0 1 0.62224,-0.919335 0.79117769,0.82409161 0 0 1 0.92316,0.583654" />
|
|
||||||
<path
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.600001;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="path11212-4"
|
|
||||||
sodipodi:type="arc"
|
|
||||||
sodipodi:cx="127.33162"
|
|
||||||
sodipodi:cy="99.361092"
|
|
||||||
sodipodi:rx="0.79117769"
|
|
||||||
sodipodi:ry="0.82409161"
|
|
||||||
sodipodi:start="0"
|
|
||||||
sodipodi:end="6.009063"
|
|
||||||
sodipodi:open="true"
|
|
||||||
sodipodi:arc-type="arc"
|
|
||||||
d="m 128.1228,99.361092 a 0.79117769,0.82409161 0 0 1 -0.737,0.822158 0.79117769,0.82409161 0 0 1 -0.83794,-0.709561 0.79117769,0.82409161 0 0 1 0.62224,-0.919334 0.79117769,0.82409161 0 0 1 0.92316,0.583653" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 90 KiB |
BIN
_img/proof.png
|
Before Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
|
@ -1,20 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg width="437px" height="301px" viewBox="0 0 437 301" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
||||||
<title>Artboard</title>
|
|
||||||
<g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
||||||
<rect fill="#FFFFFF" x="0" y="0" width="437" height="301"></rect>
|
|
||||||
<g id="Data_Queue" transform="translate(47.000000, 22.000000)">
|
|
||||||
<rect id="node0" stroke="#6D7278" stroke-width="1.00000924" fill-opacity="0.1" fill="#000000" fill-rule="nonzero" transform="translate(89.496750, 132.289251) rotate(89.753630) translate(-89.496750, -132.289251) " x="45.9963478" y="118.789126" width="87.0008043" height="27.0002496"></rect>
|
|
||||||
<polygon id="path1446" stroke="#6D7278" fill="#6D7278" fill-rule="nonzero" points="324.901 146.491 326.067 163.674 315.986 149.682"></polygon>
|
|
||||||
<path d="M58.158,130.233 L58.158,130.233 C4.629,121.641 13.264,92.714 13.264,92.714" id="path2432" stroke="#6D7278" stroke-width="0.7364"></path>
|
|
||||||
<path d="M322.443,151.213 L322.443,151.213 C302.228,124.401 246.556,129.739 246.556,129.739" id="path3204" stroke="#6D7278" stroke-width="0.7313"></path>
|
|
||||||
<rect id="rect2481" stroke="#6D7278" stroke-width="1.00000924" fill-opacity="0.1" fill="#000000" fill-rule="nonzero" transform="translate(124.496150, 132.289551) rotate(89.753630) translate(-124.496150, -132.289551) " x="80.9957478" y="118.789426" width="87.0008043" height="27.0002496"></rect>
|
|
||||||
<rect id="rect2483" stroke="#6D7278" stroke-width="1.00000924" fill-opacity="0.1" fill="#000000" fill-rule="nonzero" transform="translate(159.496550, 132.290751) rotate(89.753630) translate(-159.496550, -132.290751) " x="115.996148" y="118.790626" width="87.0008043" height="27.0002496"></rect>
|
|
||||||
<rect id="rect2485" stroke="#6D7278" stroke-width="1.00000924" fill-opacity="0.1" fill="#000000" fill-rule="nonzero" transform="translate(194.496250, 132.291151) rotate(89.753630) translate(-194.496250, -132.291151) " x="150.995848" y="118.791026" width="87.0008043" height="27.0002496"></rect>
|
|
||||||
<rect id="rect2487" stroke="#6D7278" stroke-width="1.00000924" fill-opacity="0.1" fill="#000000" fill-rule="nonzero" transform="translate(229.495850, 132.291451) rotate(89.753630) translate(-229.495850, -132.291451) " x="185.995448" y="118.791326" width="87.0008043" height="27.0002496"></rect>
|
|
||||||
<polygon id="path2489" stroke="#6D7278" fill="#6D7278" fill-rule="nonzero" points="52.739 125.016 69.294 129.764 52.706 134.485"></polygon>
|
|
||||||
<rect id="rect2491" stroke="#FA6400" stroke-width="1.00000924" fill-opacity="0.426283189" fill="#FA6400" fill-rule="nonzero" transform="translate(14.499150, 44.249475) rotate(89.753630) translate(-14.499150, -44.249475) " x="-29.0012522" y="30.7493502" width="87.0008043" height="27.0002496"></rect>
|
|
||||||
<rect id="rect2493" stroke="#6DD400" stroke-width="1.00000924" fill-opacity="0.423111069" fill="#6DD400" fill-rule="nonzero" transform="translate(329.494752, 212.751725) rotate(89.753630) translate(-329.494752, -212.751725) " x="285.99385" y="199.2516" width="87.0018043" height="27.0002496"></rect>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 194 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
|
@ -1,28 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Circuit Diagram, cdlibrary.dll 4.0.0.0 -->
|
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
||||||
<svg version="1.1" width="360" height="160" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<line x1="230" y1="130" x2="277" y2="130" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="277" y1="120" x2="277" y2="140" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="283" y1="125" x2="283" y2="135" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" />
|
|
||||||
<line x1="283" y1="130" x2="330" y2="130" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<text x="280" y="118" style="font-family:Arial;font-size:12px;text-anchor:middle" dominant-baseline="baseline" transform="rotate(0, 280, 118)">+1.5V</text>
|
|
||||||
<line x1="130" y1="130" x2="177" y2="130" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="177" y1="120" x2="177" y2="140" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="183" y1="125" x2="183" y2="135" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" />
|
|
||||||
<line x1="183" y1="130" x2="230" y2="130" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<text x="180" y="118" style="font-family:Arial;font-size:12px;text-anchor:middle" dominant-baseline="baseline" transform="rotate(0, 180, 118)">+1.5V</text>
|
|
||||||
<line x1="30" y1="130" x2="77" y2="130" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="77" y1="120" x2="77" y2="140" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="83" y1="125" x2="83" y2="135" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:3" />
|
|
||||||
<line x1="83" y1="130" x2="130" y2="130" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<text x="80" y="118" style="font-family:Arial;font-size:12px;text-anchor:middle" dominant-baseline="baseline" transform="rotate(0, 80, 118)">+1.5V</text>
|
|
||||||
<line x1="180" y1="60" x2="184" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="184" y1="50" x2="184" y2="70" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="178" y1="55" x2="178" y2="65" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="172" y1="50" x2="172" y2="70" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="166" y1="55" x2="166" y2="65" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<line x1="166" y1="60" x2="170" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
<text x="175" y="48" style="font-family:Arial;font-size:12px;text-anchor:middle" dominant-baseline="baseline" transform="rotate(0, 175, 48)">+4.5V</text>
|
|
||||||
<line x1="30" y1="60" x2="330" y2="60" style="stroke:rgb(0, 0, 0);stroke-linecap:square;stroke-width:2" />
|
|
||||||
</svg>
|
|
||||||
|
|
@ -1,245 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
width="208.46194mm"
|
|
||||||
height="72.315628mm"
|
|
||||||
viewBox="0 0 208.46193 72.315628"
|
|
||||||
version="1.1"
|
|
||||||
id="svg5"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<defs
|
|
||||||
id="defs2">
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="marker1226"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto-start-reverse"
|
|
||||||
markerWidth="5.3244081"
|
|
||||||
markerHeight="6.155385"
|
|
||||||
viewBox="0 0 5.3244081 6.1553851"
|
|
||||||
preserveAspectRatio="xMidYMid">
|
|
||||||
<path
|
|
||||||
transform="scale(0.5)"
|
|
||||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
|
||||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
|
||||||
id="path1224" />
|
|
||||||
</marker>
|
|
||||||
<marker
|
|
||||||
style="overflow:visible"
|
|
||||||
id="TriangleStart"
|
|
||||||
refX="0"
|
|
||||||
refY="0"
|
|
||||||
orient="auto-start-reverse"
|
|
||||||
markerWidth="5.3244081"
|
|
||||||
markerHeight="6.155385"
|
|
||||||
viewBox="0 0 5.3244081 6.1553851"
|
|
||||||
preserveAspectRatio="xMidYMid">
|
|
||||||
<path
|
|
||||||
transform="scale(0.5)"
|
|
||||||
style="fill:context-stroke;fill-rule:evenodd;stroke:context-stroke;stroke-width:1pt"
|
|
||||||
d="M 5.77,0 -2.88,5 V -5 Z"
|
|
||||||
id="path135" />
|
|
||||||
</marker>
|
|
||||||
<rect
|
|
||||||
x="444.00934"
|
|
||||||
y="391.71231"
|
|
||||||
width="193.4772"
|
|
||||||
height="38.969021"
|
|
||||||
id="rect2563" />
|
|
||||||
<rect
|
|
||||||
x="644.48657"
|
|
||||||
y="351.32187"
|
|
||||||
width="131.46619"
|
|
||||||
height="16.049915"
|
|
||||||
id="rect2553" />
|
|
||||||
</defs>
|
|
||||||
<g
|
|
||||||
id="layer1"
|
|
||||||
transform="translate(-22.223583,-34.805419)">
|
|
||||||
<rect
|
|
||||||
style="fill:#f2f2f2;fill-opacity:1;stroke:#000000;stroke-width:0.431001;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect2573"
|
|
||||||
width="117.65163"
|
|
||||||
height="53.563263"
|
|
||||||
x="26.310938"
|
|
||||||
y="45.766743"
|
|
||||||
rx="0"
|
|
||||||
ry="0" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.731;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect254"
|
|
||||||
width="29.939589"
|
|
||||||
height="14.958732"
|
|
||||||
x="37.675056"
|
|
||||||
y="69.985207"
|
|
||||||
ry="1.9412589"
|
|
||||||
rx="0.9042781" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.431001;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect935"
|
|
||||||
width="1.9654146"
|
|
||||||
height="6.303196"
|
|
||||||
x="67.599091"
|
|
||||||
y="74.227417"
|
|
||||||
rx="0.59598941"
|
|
||||||
ry="0.59598941" />
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#000000;stroke-width:0.631;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
d="m 65.908805,70.363433 c 0.177472,14.483408 0.177472,14.483408 0.177472,14.483408"
|
|
||||||
id="path991" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.130999;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect993"
|
|
||||||
width="0.40091172"
|
|
||||||
height="7.495573"
|
|
||||||
x="67.432716"
|
|
||||||
y="73.648491"
|
|
||||||
rx="0.59598941"
|
|
||||||
ry="0.8551048" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="47.922768"
|
|
||||||
y="78.70002"
|
|
||||||
id="text2052"><tspan
|
|
||||||
id="tspan2050"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:0.131"
|
|
||||||
x="47.922768"
|
|
||||||
y="78.70002">1.5 V</tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="80.406326"
|
|
||||||
y="58.732193"
|
|
||||||
id="text2052-2"><tspan
|
|
||||||
id="tspan2050-2"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:0.131"
|
|
||||||
x="80.406326"
|
|
||||||
y="58.732193">4.5 V</tspan></text>
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.731;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect254-8"
|
|
||||||
width="29.939589"
|
|
||||||
height="14.958732"
|
|
||||||
x="69.647232"
|
|
||||||
y="69.960724"
|
|
||||||
ry="1.9412589"
|
|
||||||
rx="0.9042781" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.431001;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect935-9"
|
|
||||||
width="1.9654146"
|
|
||||||
height="6.303196"
|
|
||||||
x="99.571266"
|
|
||||||
y="74.202934"
|
|
||||||
rx="0.59598941"
|
|
||||||
ry="0.59598941" />
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#000000;stroke-width:0.631;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
d="m 97.880982,70.338953 c 0.177472,14.483408 0.177472,14.483408 0.177472,14.483408"
|
|
||||||
id="path991-2" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.130999;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect993-6"
|
|
||||||
width="0.40091172"
|
|
||||||
height="7.495573"
|
|
||||||
x="99.404892"
|
|
||||||
y="73.624008"
|
|
||||||
rx="0.59598941"
|
|
||||||
ry="0.8551048" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="79.894943"
|
|
||||||
y="78.675537"
|
|
||||||
id="text2052-6"><tspan
|
|
||||||
id="tspan2050-4"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:0.131"
|
|
||||||
x="79.894943"
|
|
||||||
y="78.675537">1.5 V</tspan></text>
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.731;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect254-8-5"
|
|
||||||
width="29.939589"
|
|
||||||
height="14.958732"
|
|
||||||
x="101.78661"
|
|
||||||
y="70.082413"
|
|
||||||
ry="1.9412589"
|
|
||||||
rx="0.9042781" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;stroke:#000000;stroke-width:0.431001;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
id="rect935-9-0"
|
|
||||||
width="1.9654146"
|
|
||||||
height="6.303196"
|
|
||||||
x="131.71065"
|
|
||||||
y="74.324623"
|
|
||||||
rx="0.59598941"
|
|
||||||
ry="0.59598941" />
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#000000;stroke-width:0.631;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
|
|
||||||
d="m 130.02036,70.460639 c 0.17747,14.483408 0.17747,14.483408 0.17747,14.483408"
|
|
||||||
id="path991-2-4" />
|
|
||||||
<rect
|
|
||||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:0.130999;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
id="rect993-6-8"
|
|
||||||
width="0.40091172"
|
|
||||||
height="7.495573"
|
|
||||||
x="131.54427"
|
|
||||||
y="73.745697"
|
|
||||||
rx="0.59598941"
|
|
||||||
ry="0.8551048" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.131;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="112.03432"
|
|
||||||
y="78.797226"
|
|
||||||
id="text2052-6-7"><tspan
|
|
||||||
id="tspan2050-4-1"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;stroke-width:0.131"
|
|
||||||
x="112.03432"
|
|
||||||
y="78.797226">1.5 V</tspan></text>
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#marker1226);marker-end:url(#TriangleStart)"
|
|
||||||
d="m 38.260003,62.143086 94.864147,0.03514"
|
|
||||||
id="path2369" />
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52777px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.431001;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="22.439083"
|
|
||||||
y="35.02092"
|
|
||||||
id="text2549"><tspan
|
|
||||||
id="tspan2547"
|
|
||||||
style="stroke-width:0.431"
|
|
||||||
x="22.439083"
|
|
||||||
y="35.02092"> </tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
transform="scale(0.26458333)"
|
|
||||||
id="text2551"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.3333px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre;shape-inside:url(#rect2553);fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.62898;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"><tspan
|
|
||||||
x="644.48633"
|
|
||||||
y="363.66183"
|
|
||||||
id="tspan22930"> </tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52777px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.431001;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
x="224.51692"
|
|
||||||
y="98.199669"
|
|
||||||
id="text2559"><tspan
|
|
||||||
id="tspan2557"
|
|
||||||
style="stroke-width:0.431"
|
|
||||||
x="224.51692"
|
|
||||||
y="98.199669"> </tspan></text>
|
|
||||||
<text
|
|
||||||
xml:space="preserve"
|
|
||||||
transform="scale(0.26458333)"
|
|
||||||
id="text2561"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:13.3333px;font-family:Inter;-inkscape-font-specification:'Inter, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;white-space:pre;shape-inside:url(#rect2563);fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1.62898;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"><tspan
|
|
||||||
x="444.00977"
|
|
||||||
y="404.05245"
|
|
||||||
id="tspan22932"> </tspan></text>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 5 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg width="372px" height="272px" viewBox="0 0 372 272" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
||||||
<title>Artboard</title>
|
|
||||||
<g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
||||||
<rect fill="#FFFFFF" x="0" y="0" width="372" height="272"></rect>
|
|
||||||
<g id="Group" transform="translate(40.000000, 51.000000)">
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="0" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="0" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="132" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="88" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="44" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="rect2493" stroke="#6DD400" stroke-width="1.00000924" fill-opacity="0.423111069" fill="#6DD400" fill-rule="nonzero" transform="translate(188.500000, 85.000000) rotate(89.753630) translate(-188.500000, -85.000000) " x="104" y="73" width="169" height="24"></rect>
|
|
||||||
<path id="Line" d="M283.5,108.5 L292.5,113 L283.5,117.5 L283.5,113.5 L220.5,113.5 L220.5,112.5 L283.5,112.5 L283.5,108.5 Z" fill="#979797" fill-rule="nonzero"></path>
|
|
||||||
<path id="Line" d="M229.5,55.5 L229.5,59.5 L292.5,59.5 L292.5,60.5 L229.5,60.5 L229.5,64.5 L220.5,60 L229.5,55.5 Z" fill="#979797" fill-rule="nonzero"></path>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB |
|
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg width="269px" height="367px" viewBox="0 0 269 367" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
||||||
<title>Artboard</title>
|
|
||||||
<g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
||||||
<rect fill="#FFFFFF" x="0" y="0" width="269" height="367"></rect>
|
|
||||||
<g id="Group" transform="translate(130.500000, 178.000000) rotate(-90.000000) translate(-130.500000, -178.000000) translate(-16.000000, 93.000000)">
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="0" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="0" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="132" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="88" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="Rectangle" stroke="#979797" fill="#D8D8D8" x="44" y="1" width="24" height="169"></rect>
|
|
||||||
<rect id="rect2493" stroke="#6DD400" stroke-width="1.00000924" fill-opacity="0.423111069" fill="#6DD400" fill-rule="nonzero" transform="translate(188.500000, 85.000000) rotate(89.753630) translate(-188.500000, -85.000000) " x="104" y="73" width="169" height="24"></rect>
|
|
||||||
<path id="Line" d="M283.5,108.5 L292.5,113 L283.5,117.5 L283.5,113.5 L220.5,113.5 L220.5,112.5 L283.5,112.5 L283.5,108.5 Z" fill="#979797" fill-rule="nonzero"></path>
|
|
||||||
<path id="Line" d="M229.5,55.5 L229.5,59.5 L292.5,59.5 L292.5,60.5 L229.5,60.5 L229.5,64.5 L220.5,60 L229.5,55.5 Z" fill="#979797" fill-rule="nonzero"></path>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 121 KiB |
BIN
_img/step1.png
|
Before Width: | Height: | Size: 20 KiB |
BIN
_img/step2.png
|
Before Width: | Height: | Size: 22 KiB |
BIN
_img/step3.png
|
Before Width: | Height: | Size: 28 KiB |
BIN
_img/step4.png
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
BIN
_img/xor-hdl.png
|
Before Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
find /home/thomas/repos/eolas/zk/ -type f -name "*.md" | while
|
find /home/thomas/repos/eolas/zk/ -type f -name "*.md" | while read file; do
|
||||||
read file; do
|
sed -i -r 's/\[([^\]]+)\]\(\/[^)]+\)/[[\1]]/g' "$file"
|
||||||
sed -r 's/\[([^\]]+)\]\(\/[^)]+\)/[[\1]]/g'
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
33
scripts/rename-links.py
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
def trim_markdown_links(filepath):
|
||||||
|
with open(filepath, "r") as file:
|
||||||
|
content = file.read()
|
||||||
|
|
||||||
|
# Regular expression to match Markdown links
|
||||||
|
pattern = r"\[([^\]]+)\]\(([^)]+)\)"
|
||||||
|
links = re.findall(pattern, content)
|
||||||
|
|
||||||
|
# For each link, extract the filename and replace the link
|
||||||
|
for text, link in links:
|
||||||
|
link_filename = os.path.basename(link)
|
||||||
|
content = content.replace(f"[{text}]({link})", f"[{text}]({link_filename})")
|
||||||
|
|
||||||
|
# Write the modified content back to the file
|
||||||
|
with open(filepath, "w") as file:
|
||||||
|
file.write(content)
|
||||||
|
|
||||||
|
|
||||||
|
def process_directory(directory):
|
||||||
|
for filename in os.listdir(directory):
|
||||||
|
if filename.endswith(".md"):
|
||||||
|
trim_markdown_links(os.path.join(directory, filename))
|
||||||
|
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
# process_directory('/path/to/your/directory')
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
process_directory("/home/thomas/repos/eolas/zk")
|
||||||
|
|
@ -7,12 +7,12 @@ tags: [backend, node-js, REST, APIs]
|
||||||
# Creating a RESTful API: Introduction
|
# Creating a RESTful API: Introduction
|
||||||
|
|
||||||
We are going to use Express to create a
|
We are going to use Express to create a
|
||||||
[RESTful API](/Databases/RESTful_APIs.md) in Node.js.
|
[RESTful API](RESTful_APIs.md) in Node.js.
|
||||||
|
|
||||||
## Request types
|
## Request types
|
||||||
|
|
||||||
Express provides us with methods corresponding to each of the
|
Express provides us with methods corresponding to each of the
|
||||||
[HTTP request types](/Databases/HTTP_request_types.md):
|
[HTTP request types](HTTP_request_types.md):
|
||||||
|
|
||||||
- `.get()`
|
- `.get()`
|
||||||
- `.post()`
|
- `.post()`
|
||||||
|
|
@ -25,7 +25,7 @@ Express provides us with methods corresponding to each of the
|
||||||
> from a database. For simplicity we are just going simulate this with a simple
|
> from a database. For simplicity we are just going simulate this with a simple
|
||||||
> data array so that we can focus on the Express syntax rather than database
|
> data array so that we can focus on the Express syntax rather than database
|
||||||
> handling. Later we will integrate this with a
|
> handling. Later we will integrate this with a
|
||||||
> [MongoDB database](/Programming_Languages/NodeJS/REST_APIs/05_%20Integrating_the_database.md).
|
> [MongoDB database](05_%20Integrating_the_database.md).
|
||||||
|
|
||||||
We will mainly work with the following array of objects:
|
We will mainly work with the following array of objects:
|
||||||
|
|
||||||
|
|
@ -51,7 +51,7 @@ const courses = [
|
||||||
We first create an instance of Express within `index.js`. This will be the main
|
We first create an instance of Express within `index.js`. This will be the main
|
||||||
coordinating file and we will aim to minimise the amount of business logic we
|
coordinating file and we will aim to minimise the amount of business logic we
|
||||||
have in this file. It should really just be for initialization and managing
|
have in this file. It should really just be for initialization and managing
|
||||||
[middleware](/Programming_Languages/NodeJS/Architecture/Middleware.md).
|
[middleware](Middleware.md).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const express = require("express");
|
const express = require("express");
|
||||||
|
|
@ -103,10 +103,10 @@ app.listen(3000, () => console.log("Listening on port 30000..."));
|
||||||
|
|
||||||
We can now proceed to set up our RESTful endpoints:
|
We can now proceed to set up our RESTful endpoints:
|
||||||
|
|
||||||
[GET requests](/Programming_Languages/NodeJS/REST_APIs/1_GET.md)
|
[GET requests](1_GET.md)
|
||||||
|
|
||||||
[POST requests](/Programming_Languages/NodeJS/REST_APIs/2_POST.md)
|
[POST requests](2_POST.md)
|
||||||
|
|
||||||
[PUT requests](/Programming_Languages/NodeJS/REST_APIs/3_PUT.md)
|
[PUT requests](3_PUT.md)
|
||||||
|
|
||||||
[DELETE requests](/Programming_Languages/NodeJS/REST_APIs/4_DELETE.md)
|
[DELETE requests](4_DELETE.md)
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ client.
|
||||||
|
|
||||||
We should accept alterations to the database that are not first validated. We
|
We should accept alterations to the database that are not first validated. We
|
||||||
can use the
|
can use the
|
||||||
[Joi validator](/Programming_Languages/NodeJS/REST_APIs/Validation.md) to vet
|
[Joi validator](Validation.md) to vet
|
||||||
the request:
|
the request:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ the array.
|
||||||
## Set-up
|
## Set-up
|
||||||
|
|
||||||
We will follow the routine for establishing a MongoDB instance as detailed in
|
We will follow the routine for establishing a MongoDB instance as detailed in
|
||||||
[my notes](/Databases/MongoDB/Connect_to_database.md) on Mongo:
|
[my notes](Connect_to_database.md) on Mongo:
|
||||||
|
|
||||||
- [Create MongoDB database](/Databases/MongoDB/Create_database.md)
|
- [Create MongoDB database](Create_database.md)
|
||||||
- [Connect to MongoDB database](/Databases/MongoDB/Connect_to_database.md)
|
- [Connect to MongoDB database](Connect_to_database.md)
|
||||||
|
|
||||||
Our `index.js` now looks like the following:
|
Our `index.js` now looks like the following:
|
||||||
|
|
||||||
|
|
@ -122,8 +122,8 @@ const Course = mongoose.model(
|
||||||
|
|
||||||
Now we need to rewrite our RESTful request handlers so that the data is sourced
|
Now we need to rewrite our RESTful request handlers so that the data is sourced
|
||||||
from and added to the database. We will mainly be using the Mongo syntax defined
|
from and added to the database. We will mainly be using the Mongo syntax defined
|
||||||
at [Querying a collection](/Databases/MongoDB/Querying_a_collection.md) and
|
at [Querying a collection](Querying_a_collection.md) and
|
||||||
[Adding documents to a collection](/Databases/MongoDB/Adding_documents_to_a_collection.md).
|
[Adding documents to a collection](Adding_documents_to_a_collection.md).
|
||||||
We will also keep API validation within the `/model/` file.
|
We will also keep API validation within the `/model/` file.
|
||||||
|
|
||||||
### GET
|
### GET
|
||||||
|
|
@ -174,7 +174,7 @@ router.post("/", async (req, res) => {
|
||||||
### PUT
|
### PUT
|
||||||
|
|
||||||
When updating a value in the database we are going to use the
|
When updating a value in the database we are going to use the
|
||||||
[query-first](/Databases/MongoDB/Update_document.md#query-first-document-update)
|
[query-first](Update_document.md#query-first-document-update)
|
||||||
approach to updating a Mongo document.
|
approach to updating a Mongo document.
|
||||||
|
|
||||||
```jsconst courseSchema = new mongoose.Schema({
|
```jsconst courseSchema = new mongoose.Schema({
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,13 @@ tags: [AWS, APIs]
|
||||||
# AWS API Gateway
|
# AWS API Gateway
|
||||||
|
|
||||||
We can use Gateway as the front-door to our application. It will create an
|
We can use Gateway as the front-door to our application. It will create an
|
||||||
[HTTP](/Databases/REST/HTTP_request_types.md) endpoint that you can call from a
|
[HTTP](HTTP_request_types.md) endpoint that you can call from a
|
||||||
client. In response to a client request you can then call a
|
client. In response to a client request you can then call a
|
||||||
[lambda function](/DevOps/AWS/AWS_Lambda/Lambda_handler_function.md) that
|
[lambda function](Lambda_handler_function.md) that
|
||||||
executes a backend process.
|
executes a backend process.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
See
|
See
|
||||||
[using API Gateway as Lambda trigger](/DevOps/AWS/AWS_Lambda/Practical_walkthrough_Lambda_creation_within_AWS.md)
|
[using API Gateway as Lambda trigger](Practical_walkthrough_Lambda_creation_within_AWS.md)
|
||||||
for a basic example of usage.
|
for a basic example of usage.
|
||||||
|
|
|
||||||
|
|
@ -46,5 +46,5 @@ Here is an example of a resource permission giving access to a Lambda:
|
||||||
```
|
```
|
||||||
|
|
||||||
See
|
See
|
||||||
[Fetch from Secrets Manager](/DevOps/AWS/AWS_Lambda/Code_examples/Fetch_from_Secrets_Manager.md)
|
[Fetch from Secrets Manager](Fetch_from_Secrets_Manager.md)
|
||||||
for a code example of retrieving a value from Secrets Manager.
|
for a code example of retrieving a value from Secrets Manager.
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ $$
|
||||||
### Lowest common denominator and lowest common multiple
|
### Lowest common denominator and lowest common multiple
|
||||||
|
|
||||||
Given the symmetry between
|
Given the symmetry between
|
||||||
[factors and divisors](/Mathematics/Prealgebra/Factors_and_divisors.md) these
|
[factors and divisors](Factors_and_divisors.md) these
|
||||||
properties are related. Note however that the LCM is more generic: it applies to
|
properties are related. Note however that the LCM is more generic: it applies to
|
||||||
any set of numbers not just fractions. Whereas the LCD is explicitly to do with
|
any set of numbers not just fractions. Whereas the LCD is explicitly to do with
|
||||||
fractions (hence 'denominator').
|
fractions (hence 'denominator').
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
tags: [algorithms]
|
tags: [algorithms]
|
||||||
---
|
---
|
||||||
|
|
||||||

|

|
||||||
_Summary of the main classes of algorithmic complexity_
|
_Summary of the main classes of algorithmic complexity_
|
||||||
|
|
||||||
## Distinguish algorithms from programs
|
## Distinguish algorithms from programs
|
||||||
|
|
@ -117,7 +117,7 @@ following data set:
|
||||||
| 5 | 5 |
|
| 5 | 5 |
|
||||||
|
|
||||||
If we plotted this as a graph it is clear that this is equivalent to a linear
|
If we plotted this as a graph it is clear that this is equivalent to a linear
|
||||||
distribution:
|
distribution:
|
||||||
|
|
||||||
Algorithms which display this distribution are therefore called **linear
|
Algorithms which display this distribution are therefore called **linear
|
||||||
algorithms**.
|
algorithms**.
|
||||||
|
|
@ -240,7 +240,7 @@ factor of it. Therefore the runtime is not growing proportional to the size of
|
||||||
the input, it is growing proportional to the size of the input squared.
|
the input, it is growing proportional to the size of the input squared.
|
||||||
|
|
||||||
Graphically this is represented with a curving lines as follows:
|
Graphically this is represented with a curving lines as follows:
|
||||||

|

|
||||||
|
|
||||||
We can clearly see that as n grows, the runtime gets steeper and more
|
We can clearly see that as n grows, the runtime gets steeper and more
|
||||||
pronounced,
|
pronounced,
|
||||||
|
|
@ -289,7 +289,7 @@ Back to algorithms: $O(\log n)$ is a really good complexity to have. It is close
|
||||||
to O(1) and in between O(1) and O(n). Represented graphically, it starts of with
|
to O(1) and in between O(1) and O(n). Represented graphically, it starts of with
|
||||||
a slight increase in runtime but then quickly levels off:
|
a slight increase in runtime but then quickly levels off:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Many sorting algorithms run in log n time, as does recursion.
|
Many sorting algorithms run in log n time, as does recursion.
|
||||||
|
|
||||||
|
|
@ -354,7 +354,7 @@ we should keep in mind the following shorthands:
|
||||||
|
|
||||||
With this in mind we can break down the `findSum` function like so:
|
With this in mind we can break down the `findSum` function like so:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
This gives us:
|
This gives us:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ one of a limited set of values.
|
||||||
Computers only use two symbols for each value: 0 and 1.
|
Computers only use two symbols for each value: 0 and 1.
|
||||||
|
|
||||||
Although a digital system could use more than two symbols, adding more would
|
Although a digital system could use more than two symbols, adding more would
|
||||||
[increase the complexity](/Electronics_and_Hardware/Binary/Why_computers_use_binary.md#from-circuits-to-programs)
|
[increase the complexity](Why_computers_use_binary.md#from-circuits-to-programs)
|
||||||
and cost of the system. A set of only two symbols allows for simplified hardware
|
and cost of the system. A set of only two symbols allows for simplified hardware
|
||||||
and improved reliability.
|
and improved reliability.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,12 @@ tags: [graphql]
|
||||||
# Apollo Client
|
# Apollo Client
|
||||||
|
|
||||||
Apollo Client is the client-side counterpart to
|
Apollo Client is the client-side counterpart to
|
||||||
[Apollo Server](/Databases/GraphQL/Apollo/Apollo_Server.md). We use it for
|
[Apollo Server](Apollo_Server.md). We use it for
|
||||||
managing queries and mutations from the frontend to our Apollo GraphQL server.
|
managing queries and mutations from the frontend to our Apollo GraphQL server.
|
||||||
It is specifically designed to work with React.
|
It is specifically designed to work with React.
|
||||||
|
|
||||||
> We will be working with the
|
> We will be working with the
|
||||||
> [schema](/Databases/GraphQL/Apollo/Apollo_Server.md#example-schema) we defined
|
> [schema](Apollo_Server.md#example-schema) we defined
|
||||||
> when working on the server
|
> when working on the server
|
||||||
|
|
||||||
## Initializing the client
|
## Initializing the client
|
||||||
|
|
@ -58,7 +58,7 @@ between the frontend and the backend, it is not itself executable code.
|
||||||
Therefore, for each query in the schema we must write a frontend implementation.
|
Therefore, for each query in the schema we must write a frontend implementation.
|
||||||
We do this with **query constants**. The frontend implementation has a backend
|
We do this with **query constants**. The frontend implementation has a backend
|
||||||
analogue: the
|
analogue: the
|
||||||
[resolver](/Databases/GraphQL/Apollo/Apollo_Server.md#implementing-resolvers)
|
[resolver](Apollo_Server.md#implementing-resolvers)
|
||||||
that is invoked when the frontend issues a query. The schema standardises this
|
that is invoked when the frontend issues a query. The schema standardises this
|
||||||
relationship so that every query on the client must have a corresponding
|
relationship so that every query on the client must have a corresponding
|
||||||
resolver on the backend.
|
resolver on the backend.
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ type Author {
|
||||||
|
|
||||||
We instantiate an `ApolloServer` instance and pass our schema to it. We then
|
We instantiate an `ApolloServer` instance and pass our schema to it. We then
|
||||||
subscribe to it with a
|
subscribe to it with a
|
||||||
[listener](/Programming_Languages/Node/Modules/Core/Node_JS_events_module.md#extending-the-eventemitter-class).
|
[listener](Node_JS_events_module.md#extending-the-eventemitter-class).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// index.js
|
// index.js
|
||||||
|
|
@ -121,12 +121,12 @@ const server = new ApolloServer({ typeDefs, mocks });
|
||||||
```
|
```
|
||||||
|
|
||||||
We can now
|
We can now
|
||||||
[run queries](/Databases/GraphQL/Apollo/Apollo_Client.md#running-a-query)
|
[run queries](Apollo_Client.md#running-a-query)
|
||||||
against our server.
|
against our server.
|
||||||
|
|
||||||
## Implementing resolvers
|
## Implementing resolvers
|
||||||
|
|
||||||
A resolver is a [function](/Trash/Creating_a_GraphQL_server.md#resolvers) that
|
A resolver is a [function](Creating_a_GraphQL_server.md#resolvers) that
|
||||||
populates data for a given query. It should have **the same name as the field
|
populates data for a given query. It should have **the same name as the field
|
||||||
for the query**. So far we have one query in our schema: `tracksForHome` which
|
for the query**. So far we have one query in our schema: `tracksForHome` which
|
||||||
returns the tracks to be listed on the home page. We must therefore also name
|
returns the tracks to be listed on the home page. We must therefore also name
|
||||||
|
|
@ -136,7 +136,7 @@ It can fetch data from a single data source or multiple data sources (other
|
||||||
servers, databases, REST APIs) and present this as a single integrated resource
|
servers, databases, REST APIs) and present this as a single integrated resource
|
||||||
to the client, matching the shape requested.
|
to the client, matching the shape requested.
|
||||||
|
|
||||||
As per the [generic example](/Trash/Creating_a_GraphQL_server.md#resolvers), you
|
As per the [generic example](Creating_a_GraphQL_server.md#resolvers), you
|
||||||
write write your resolvers as keys on a `resolvers` object, e.g:
|
write write your resolvers as keys on a `resolvers` object, e.g:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
@ -162,7 +162,7 @@ implementing the resolution: `resolverFunction(parent, args, context, info)`.
|
||||||
|
|
||||||
- `parent`
|
- `parent`
|
||||||
- Used with
|
- Used with
|
||||||
[resolver chains](/Databases/GraphQL/Apollo/Using_arguments_with_Apollo_Client.md#resolver-chains)
|
[resolver chains](Using_arguments_with_Apollo_Client.md#resolver-chains)
|
||||||
---add example
|
---add example
|
||||||
- `args`
|
- `args`
|
||||||
- an object comprising arguments provided for the given field by the client.
|
- an object comprising arguments provided for the given field by the client.
|
||||||
|
|
@ -296,7 +296,7 @@ const resolvers = {
|
||||||
`ApolloServer` instance.
|
`ApolloServer` instance.
|
||||||
* This time we utilise the `args` parameter in the resolver since an `id` will
|
* This time we utilise the `args` parameter in the resolver since an `id` will
|
||||||
be provided as a client-side
|
be provided as a client-side
|
||||||
[argument](/Databases/GraphQL/Apollo/Using_arguments_with_Apollo_Client.md) to
|
[argument](Using_arguments_with_Apollo_Client.md) to
|
||||||
return a specific author.
|
return a specific author.
|
||||||
|
|
||||||
## The `useMutation` hook
|
## The `useMutation` hook
|
||||||
|
|
@ -304,4 +304,4 @@ const resolvers = {
|
||||||
We invoke the `useMutation` hook to issue mutations from the client-side.
|
We invoke the `useMutation` hook to issue mutations from the client-side.
|
||||||
|
|
||||||
As with queries and
|
As with queries and
|
||||||
[query constants](/Databases/GraphQL/Apollo/Apollo_Client.md#query-constants)
|
[query constants](Apollo_Client.md#query-constants)
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ tags:
|
||||||
|
|
||||||
# Application state management
|
# Application state management
|
||||||
|
|
||||||
Although [useReducer](./useReducer.md) and [useContext](./useContext.md) have
|
Although [useReducer](useReducer.md) and [useContext](useContext.md) have
|
||||||
many sound use cases by themselves, when they are combined they offer a way to
|
many sound use cases by themselves, when they are combined they offer a way to
|
||||||
acheive a system of global state management, without utilising third-party
|
acheive a system of global state management, without utilising third-party
|
||||||
libraries like Redux.
|
libraries like Redux.
|
||||||
|
|
@ -50,7 +50,7 @@ export const CounterContext = React.createContext({});
|
||||||
|
|
||||||
Now we need a reducer that will handle the state updates. We will just use the
|
Now we need a reducer that will handle the state updates. We will just use the
|
||||||
same setup as we used in the example of
|
same setup as we used in the example of
|
||||||
[useReducer](./useReducer.md#refining-the-syntax):
|
[useReducer](useReducer.md#refining-the-syntax):
|
||||||
|
|
||||||
```js
|
```js
|
||||||
function reducer(state, action) {
|
function reducer(state, action) {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ src/
|
||||||
- The `App` component is your parent component and the container for your app.
|
- The `App` component is your parent component and the container for your app.
|
||||||
It is where you will import your sub-components.
|
It is where you will import your sub-components.
|
||||||
- If you are using React Router `App` becomes the index for the different page
|
- If you are using React Router `App` becomes the index for the different page
|
||||||
components. See [Routing](./Routing.md) for more detail.
|
components. See [Routing](Routing.md) for more detail.
|
||||||
|
|
||||||
## `build`
|
## `build`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,23 +7,23 @@ tags: [CPU]
|
||||||
# Arithmetic Logic Unit (ALU)
|
# Arithmetic Logic Unit (ALU)
|
||||||
|
|
||||||
The ALU is the centerpiece or core of the
|
The ALU is the centerpiece or core of the
|
||||||
[CPU](/Computer_Architecture/CPU/CPU_architecture.md) architecture, where the
|
[CPU](CPU_architecture.md) architecture, where the
|
||||||
binary calculations occur. All the other components on the CPU chip are
|
binary calculations occur. All the other components on the CPU chip are
|
||||||
appendanges to the execution that occurs within the ALU.
|
appendanges to the execution that occurs within the ALU.
|
||||||
|
|
||||||
The ALU comprises
|
The ALU comprises
|
||||||
[logic gates](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md) that
|
[logic gates](Logic_gates.md) that
|
||||||
execute the instructions passed from memory and where the data stored by the
|
execute the instructions passed from memory and where the data stored by the
|
||||||
registers is acted upon. A processor's ALU is just a complex combinatorial logic
|
registers is acted upon. A processor's ALU is just a complex combinatorial logic
|
||||||
circuit.
|
circuit.
|
||||||
|
|
||||||
It executes arithmetic and logical operations on binary numbers and where you
|
It executes arithmetic and logical operations on binary numbers and where you
|
||||||
will find operations conducted by
|
will find operations conducted by
|
||||||
[full-adders and half adders](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md)
|
[full-adders and half adders](Half_adder_and_full_adder.md)
|
||||||
etc.
|
etc.
|
||||||
|
|
||||||
More specifically, the ALU is responsible for the _execute_ phase of the
|
More specifically, the ALU is responsible for the _execute_ phase of the
|
||||||
[fetch, decode, execute cycle](/Computer_Architecture/CPU/Fetch_decode_execute.md).
|
[fetch, decode, execute cycle](Fetch_decode_execute.md).
|
||||||
|
|
||||||
## ALU execution lifecycle
|
## ALU execution lifecycle
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,4 @@ Sets which contain the same members are the same set. If sets A and B contain
|
||||||
the same elements then A = B.
|
the same elements then A = B.
|
||||||
$$\forall a \forall b [\forall x (x \in a \longleftrightarrow x \in b) \rightarrow a =b]$$
|
$$\forall a \forall b [\forall x (x \in a \longleftrightarrow x \in b) \rightarrow a =b]$$
|
||||||
|
|
||||||
[link to test](/testFolder/beta.md)
|
[link to test](beta.md)
|
||||||
|
|
|
||||||
|
|
@ -126,4 +126,4 @@ This asserts that B is not a superset of A.
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
[Set symbols](https://www.mathsisfun.com/sets/symbols.html)
|
[Set symbols](symbols.html)
|
||||||
|
|
|
||||||
|
|
@ -39,4 +39,4 @@ customElements.define("my-component", MyComponent);
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
[A complete introdution to Web Components](https://kinsta.com/blog/web-components/)
|
[A complete introdution to Web Components]()
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags: [binary, binary-encoding]
|
||||||
|
|
||||||
The approach to encoding binary representations of colour is very similar to the
|
The approach to encoding binary representations of colour is very similar to the
|
||||||
approach we explored when looking at the encoding of
|
approach we explored when looking at the encoding of
|
||||||
[alphanumeric values](/Electronics_and_Hardware/Binary/Text_encoding.md).
|
[alphanumeric values](Text_encoding.md).
|
||||||
|
|
||||||
We begin by determining the total number of colours and colour shades we want to
|
We begin by determining the total number of colours and colour shades we want to
|
||||||
represent. With this value established we then decide on the bit-length required
|
represent. With this value established we then decide on the bit-length required
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags: [binary, binary-encoding]
|
||||||
# Text encoding
|
# Text encoding
|
||||||
|
|
||||||
Text encoding is an applied instance of
|
Text encoding is an applied instance of
|
||||||
[binary encoding](/Electronics_and_Hardware/Binary/Binary_encoding.md).
|
[binary encoding](Binary_encoding.md).
|
||||||
|
|
||||||
## ASCII
|
## ASCII
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ Counting in binary:
|
||||||
## Binary prefix
|
## Binary prefix
|
||||||
|
|
||||||
To distinguish numbers in binary from decimal or
|
To distinguish numbers in binary from decimal or
|
||||||
[hexadecimal](/Electronics_and_Hardware/Binary/Hexadecimal_number_system.md)
|
[hexadecimal](Hexadecimal_number_system.md)
|
||||||
numbers, it is common to use the prefix `0b`. Thus, e.g, `0b110` for decimal
|
numbers, it is common to use the prefix `0b`. Thus, e.g, `0b110` for decimal
|
||||||
`6`.
|
`6`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ the number 343 is a number containing three digits. A digit can be any one of
|
||||||
the ten numerals through 0-9.
|
the ten numerals through 0-9.
|
||||||
|
|
||||||
The equivalent entity in the
|
The equivalent entity in the
|
||||||
[binary number system](/Electronics_and_Hardware/Binary/Binary_number_system.md)
|
[binary number system](Binary_number_system.md)
|
||||||
is the **bit**. For example the binary number 110 has three bits. A bit can only
|
is the **bit**. For example the binary number 110 has three bits. A bit can only
|
||||||
have one of two values in contrast to a digit which can have one of ten values.
|
have one of two values in contrast to a digit which can have one of ten values.
|
||||||
These values are 0 and 1.
|
These values are 0 and 1.
|
||||||
|
|
@ -57,7 +57,7 @@ A byte allows for a complexity of up to 256 possible states: $2^{8} = 256$
|
||||||
|
|
||||||
Having established that the core quantity of information is the byte, the
|
Having established that the core quantity of information is the byte, the
|
||||||
convention is to apply the
|
convention is to apply the
|
||||||
[standard metric prefixes](/Electronics_and_Hardware/Prefixes_for_units_of_electrical_measurement.md)
|
[standard metric prefixes](Prefixes_for_units_of_electrical_measurement.md)
|
||||||
to the byte to establish units:
|
to the byte to establish units:
|
||||||
|
|
||||||
| Prefix | Symbol | Expression as base ten exponent | Value | English word |
|
| Prefix | Symbol | Expression as base ten exponent | Value | English word |
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ $$
|
||||||
$$
|
$$
|
||||||
|
|
||||||
Compare the
|
Compare the
|
||||||
[Commutative Law](/Mathematics/Prealgebra/Whole_numbers.md#the-commutative-property)
|
[Commutative Law](Whole_numbers.md#the-commutative-property)
|
||||||
in the context of arithmetic.
|
in the context of arithmetic.
|
||||||
|
|
||||||
### The Associative Law
|
### The Associative Law
|
||||||
|
|
@ -38,7 +38,7 @@ $$
|
||||||
$$
|
$$
|
||||||
|
|
||||||
Compare the
|
Compare the
|
||||||
[Associative Law](/Mathematics/Prealgebra/Whole_numbers.md#the-associative-property)
|
[Associative Law](Whole_numbers.md#the-associative-property)
|
||||||
in the context of arithmetic.
|
in the context of arithmetic.
|
||||||
|
|
||||||
### The Distributive Law
|
### The Distributive Law
|
||||||
|
|
@ -52,7 +52,7 @@ $$
|
||||||
$$
|
$$
|
||||||
|
|
||||||
Compare how the
|
Compare how the
|
||||||
[Distributive Law applies in the case of algebra based on arithmetic](/Mathematics/Prealgebra/Distributivity.md):
|
[Distributive Law applies in the case of algebra based on arithmetic](Distributivity.md):
|
||||||
|
|
||||||
$$
|
$$
|
||||||
a \cdot (b + c) = a \cdot b + a \cdot c
|
a \cdot (b + c) = a \cdot b + a \cdot c
|
||||||
|
|
@ -77,7 +77,7 @@ $$
|
||||||
### DeMorgan's Laws
|
### DeMorgan's Laws
|
||||||
|
|
||||||
In addition we have
|
In addition we have
|
||||||
[DeMorgan's Laws](/Logic/Laws_and_theorems.md/DeMorgan's_Laws.md) which express
|
[DeMorgan's Laws](DeMorgan's_Laws.md) which express
|
||||||
the relationship that obtains between the negations of conjunctive and
|
the relationship that obtains between the negations of conjunctive and
|
||||||
disjunctive expressions:
|
disjunctive expressions:
|
||||||
|
|
||||||
|
|
@ -158,8 +158,8 @@ with a truth table:
|
||||||
The fact that we can take a complex Boolean function and reduce it to a simpler
|
The fact that we can take a complex Boolean function and reduce it to a simpler
|
||||||
formulation has great significance for the development of computer
|
formulation has great significance for the development of computer
|
||||||
architectures, specifically
|
architectures, specifically
|
||||||
[logic gates](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md). It
|
[logic gates](Logic_gates.md). It
|
||||||
would be rather resource intensive and inefficient to create a gate that is
|
would be rather resource intensive and inefficient to create a gate that is
|
||||||
representative of the complex function. Whereas the simplified version only
|
representative of the complex function. Whereas the simplified version only
|
||||||
requires a single
|
requires a single
|
||||||
[OR gate](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#or-gate).
|
[OR gate](Logic_gates.md#or-gate).
|
||||||
|
|
|
||||||
|
|
@ -8,17 +8,17 @@ tags: [propositional-logic, nand-to-tetris]
|
||||||
# Boolean function synthesis
|
# Boolean function synthesis
|
||||||
|
|
||||||
When we looked at
|
When we looked at
|
||||||
[boolean functions](/Logic/Propositional_logic/Boolean_functions.md) we were
|
[boolean functions](Boolean_functions.md) we were
|
||||||
working in a particular direction: from a function to a truth table. When we do
|
working in a particular direction: from a function to a truth table. When we do
|
||||||
Boolean function synthesis we work in the opposite direction: from a truth table
|
Boolean function synthesis we work in the opposite direction: from a truth table
|
||||||
to a function.
|
to a function.
|
||||||
|
|
||||||
This is an important skill that we will use when constructing
|
This is an important skill that we will use when constructing
|
||||||
[logic circuits](/Electronics_and_Hardware/Digital_circuits/Digital_circuits.md).
|
[logic circuits](Digital_circuits.md).
|
||||||
We will go from truth conditions (i.e. what we want the circuit to do and when
|
We will go from truth conditions (i.e. what we want the circuit to do and when
|
||||||
we want it to do it) to a function expression which is then reduced to its
|
we want it to do it) to a function expression which is then reduced to its
|
||||||
simplest form and implemented with
|
simplest form and implemented with
|
||||||
[logic gates](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md).
|
[logic gates](Logic_gates.md).
|
||||||
Specifically, NAND gates.
|
Specifically, NAND gates.
|
||||||
|
|
||||||
We will show here that a complex logical expression can be reduced to an
|
We will show here that a complex logical expression can be reduced to an
|
||||||
|
|
@ -88,7 +88,7 @@ $$
|
||||||
$$
|
$$
|
||||||
|
|
||||||
Notice that $\lnot(z)$ is repeated so we can remove the repetition through
|
Notice that $\lnot(z)$ is repeated so we can remove the repetition through
|
||||||
[idempotence](/Logic/Propositional_logic/Boolean_algebra.md#idempotent-law):
|
[idempotence](Boolean_algebra.md#idempotent-law):
|
||||||
|
|
||||||
$$
|
$$
|
||||||
\lnot z \land (\lnot(x) \lor \lnot(y))
|
\lnot z \land (\lnot(x) \lor \lnot(y))
|
||||||
|
|
@ -121,7 +121,7 @@ $$
|
||||||
|
|
||||||
Finally, we can simplify even further by doing away with AND and NOT and using a
|
Finally, we can simplify even further by doing away with AND and NOT and using a
|
||||||
single
|
single
|
||||||
[NAND gate](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#nand-gate)
|
[NAND gate](Logic_gates.md#nand-gate)
|
||||||
which embodies the logic of both, being true in all instances where AND would be
|
which embodies the logic of both, being true in all instances where AND would be
|
||||||
false: $\lnot (x \land y)$.
|
false: $\lnot (x \land y)$.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Here is a work through where $f(1, 0, 1)$:
|
||||||
and both of its disjuncts are false
|
and both of its disjuncts are false
|
||||||
|
|
||||||
We can compute all possible outputs of the function by constructing a
|
We can compute all possible outputs of the function by constructing a
|
||||||
[trkjuth table](/Logic/Propositional_logic/Truth-tables.md) with each possible
|
[trkjuth table](Truth-tables.md) with each possible
|
||||||
variable as the truth conditions and the output of the function as the truth
|
variable as the truth conditions and the output of the function as the truth
|
||||||
value:
|
value:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ tags:
|
||||||
The primary or boot
|
The primary or boot
|
||||||
[partition](Disks.md#primary-extended-and-logical-partitions) of a harddisk
|
[partition](Disks.md#primary-extended-and-logical-partitions) of a harddisk
|
||||||
contains a bootloader. It is the job of the bootloader to locate the
|
contains a bootloader. It is the job of the bootloader to locate the
|
||||||
[kernel](/Operating_Systems/The_Kernel.md) on the harddrive and inject it into
|
[kernel](The_Kernel.md) on the harddrive and inject it into
|
||||||
memory so that they operating system can start. This is the boot process.
|
memory so that they operating system can start. This is the boot process.
|
||||||
|
|
||||||
## Boot loaders
|
## Boot loaders
|
||||||
|
|
@ -82,7 +82,7 @@ would with any other filesystem, allowing for advanced configuration.
|
||||||
3. The kernel initializes the devices and its drivers.
|
3. The kernel initializes the devices and its drivers.
|
||||||
4. The kernel mounts the root filesystem.
|
4. The kernel mounts the root filesystem.
|
||||||
5. The kernel starts a program called **init**. It has a
|
5. The kernel starts a program called **init**. It has a
|
||||||
[process id](/Programming_Languages/Shell_Scripting/Processes.md#processes-ps)
|
[process id](Processes.md#processes-ps)
|
||||||
of 1. This is the point at which [user space](User_Space.md) starts.
|
of 1. This is the point at which [user space](User_Space.md) starts.
|
||||||
6. Init sets the rest of the system processes in motion.
|
6. Init sets the rest of the system processes in motion.
|
||||||
7. At the end of the boot process, init starts a process allowing you to log in.
|
7. At the end of the boot process, init starts a process allowing you to log in.
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,11 @@ can mean:
|
||||||
|
|
||||||
| Bus type | Description |
|
| Bus type | Description |
|
||||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| System bus | The primary pathway between the CPU and [memory](/Computer_Architecture/Memory/Memory.md). It comprises the **data bus** that transfers data from the memory to the CPU and the **address bus** which transmits requests from the CPU to memory. |
|
| System bus | The primary pathway between the CPU and [memory](Memory.md). It comprises the **data bus** that transfers data from the memory to the CPU and the **address bus** which transmits requests from the CPU to memory. |
|
||||||
| Internal bus | Connects local devices for example the harddisk to the CPU. |
|
| Internal bus | Connects local devices for example the harddisk to the CPU. |
|
||||||
| External bus | Connects peripheral devices such as disks and printers to the [motherboard](/Electronics_and_Hardware/Motherboard.md) |
|
| External bus | Connects peripheral devices such as disks and printers to the [motherboard](Motherboard.md) |
|
||||||
| Expansion bus | Allows expansion boards to access the CPU and memory. |
|
| Expansion bus | Allows expansion boards to access the CPU and memory. |
|
||||||
| Frontside bus | Main computer bus that determines data transfer rate speed and is the primary data transfer path between the CPU, RAM and other [motherboard](/Electronics_and_Hardware/Motherboard.md) devices. |
|
| Frontside bus | Main computer bus that determines data transfer rate speed and is the primary data transfer path between the CPU, RAM and other [motherboard](Motherboard.md) devices. |
|
||||||
| Backside bus | Transfers secondary cache (L2 cache) data at faster speeds, allowing more efficient CPU operations |
|
| Backside bus | Transfers secondary cache (L2 cache) data at faster speeds, allowing more efficient CPU operations |
|
||||||
|
|
||||||
## Bus standards
|
## Bus standards
|
||||||
|
|
@ -48,7 +48,7 @@ transmit each bit of data simultaneously.
|
||||||
|
|
||||||
- Serial buses are cheaper to implement than parallel buses
|
- Serial buses are cheaper to implement than parallel buses
|
||||||
- Serial buses operate at greater
|
- Serial buses operate at greater
|
||||||
[latency](/Computer_Architecture/Bus.md#latency) than parallel buses
|
[latency](Bus.md#latency) than parallel buses
|
||||||
|
|
||||||
## Latency
|
## Latency
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ tags: [CPU, electromagnetism, clock]
|
||||||
|
|
||||||
At the core of a computer sits the Central Processing Unit. This is the assembly
|
At the core of a computer sits the Central Processing Unit. This is the assembly
|
||||||
of chips that execute all computation. Instructions are passed to the CPU along
|
of chips that execute all computation. Instructions are passed to the CPU along
|
||||||
the data bus part of the [system bus](/Computer_Architecture/Bus.md) from the
|
the data bus part of the [system bus](Bus.md) from the
|
||||||
memory. The [kernel](/Operating_Systems/The_Kernel.md), also residing in memory,
|
memory. The [kernel](The_Kernel.md), also residing in memory,
|
||||||
sequences and schedules the sending of data to the CPU and manages requests from
|
sequences and schedules the sending of data to the CPU and manages requests from
|
||||||
the CPU for data in memory.
|
the CPU for data in memory.
|
||||||
|
|
||||||
|
|
@ -29,13 +29,13 @@ The CPU comprises three core components:
|
||||||
## Registers
|
## Registers
|
||||||
|
|
||||||
This is the part of the CPU that stores data. The memory cells that comprise it
|
This is the part of the CPU that stores data. The memory cells that comprise it
|
||||||
do not have [capacitors](/Computer_Architecture/Memory/Memory.md) (unlike RAM)
|
do not have [capacitors](Memory.md) (unlike RAM)
|
||||||
so they cannot store very much data but they work faster, which is what is
|
so they cannot store very much data but they work faster, which is what is
|
||||||
important. Because their memory capacity is so small, we measure the size of
|
important. Because their memory capacity is so small, we measure the size of
|
||||||
registers in bits rather than bytes.
|
registers in bits rather than bytes.
|
||||||
|
|
||||||
In terms of speed, registers sit at the top part of the overall
|
In terms of speed, registers sit at the top part of the overall
|
||||||
[memory hierarchy](/Computer_Architecture/Memory/Memory.md#the-memory-hierarchy).
|
[memory hierarchy](Memory.md#the-memory-hierarchy).
|
||||||
|
|
||||||
There are five main types of register in the CPU:
|
There are five main types of register in the CPU:
|
||||||
|
|
||||||
|
|
@ -49,11 +49,11 @@ There are five main types of register in the CPU:
|
||||||
|
|
||||||
## Arithmetic Logic Unit
|
## Arithmetic Logic Unit
|
||||||
|
|
||||||
See [Arithmetic Logic Unit](/Computer_Architecture/CPU/Arithmetic_Logic_Unit.md)
|
See [Arithmetic Logic Unit](Arithmetic_Logic_Unit.md)
|
||||||
|
|
||||||
## Control Unit
|
## Control Unit
|
||||||
|
|
||||||
The CPU's [controller](/Computer_Architecture/Chipset_and_controllers.md). It
|
The CPU's [controller](Chipset_and_controllers.md). It
|
||||||
takes the instructions in binary form from RAM memory (separate from the CPU,
|
takes the instructions in binary form from RAM memory (separate from the CPU,
|
||||||
but connected) and then signals to the to ALU and memory registers what it is
|
but connected) and then signals to the to ALU and memory registers what it is
|
||||||
supposed to do to execute the instructions. Think of it as the overseer that
|
supposed to do to execute the instructions. Think of it as the overseer that
|
||||||
|
|
@ -73,11 +73,11 @@ cycle_.
|
||||||
The clock's circuitry is based on a quartz crystal system like that used in
|
The clock's circuitry is based on a quartz crystal system like that used in
|
||||||
watches. At precisely timed intervals, the clock sends out pulses of electricity
|
watches. At precisely timed intervals, the clock sends out pulses of electricity
|
||||||
that cause bits to move from place to place within
|
that cause bits to move from place to place within
|
||||||
[logic gates](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md) or
|
[logic gates](Logic_gates.md) or
|
||||||
between logic gates and
|
between logic gates and
|
||||||
[registers](/Computer_Architecture/CPU/CPU_architecture.md#registers). This is
|
[registers](CPU_architecture.md#registers). This is
|
||||||
covered in greater detail in the discussion of
|
covered in greater detail in the discussion of
|
||||||
[clock signals in digital circuits](/Electronics_and_Hardware/Digital_circuits/Clock_signals.md).
|
[clock signals in digital circuits](Clock_signals.md).
|
||||||
|
|
||||||
Simple instructions such as add can often be executed in just one clock cycle,
|
Simple instructions such as add can often be executed in just one clock cycle,
|
||||||
whilst complex operations such as divide will require a number of smaller steps,
|
whilst complex operations such as divide will require a number of smaller steps,
|
||||||
|
|
@ -95,14 +95,14 @@ Hz a processor possesses.
|
||||||
## Processing cycles
|
## Processing cycles
|
||||||
|
|
||||||
Each "cycle" is the execution of a process that commences once the
|
Each "cycle" is the execution of a process that commences once the
|
||||||
[kernel](/Operating_Systems/The_Kernel.md) hands control to the CPU. Each cycle
|
[kernel](The_Kernel.md) hands control to the CPU. Each cycle
|
||||||
follows a sequence of events known as
|
follows a sequence of events known as
|
||||||
[fetch, decode, and execute](/Computer_Architecture/CPU/Fetch_decode_execute.md).
|
[fetch, decode, and execute](Fetch_decode_execute.md).
|
||||||
|
|
||||||
## Electromagnetism: broader scientific context
|
## Electromagnetism: broader scientific context
|
||||||
|
|
||||||
Hertz was the scientist who detected
|
Hertz was the scientist who detected
|
||||||
[electromagentic waves](/Electronics_and_Hardware/Physics_of_electricity/Electromagnetism.md).
|
[electromagentic waves](Electromagnetism.md).
|
||||||
We use Hertz as a measure of the frequency of electromatic wave cycles in a
|
We use Hertz as a measure of the frequency of electromatic wave cycles in a
|
||||||
signal.
|
signal.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ tags: []
|
||||||
|
|
||||||
# The call-stack
|
# The call-stack
|
||||||
|
|
||||||
A [stack](/Data_Structures/Stacks.md) data structure that holds the information
|
A [stack](Stacks.md) data structure that holds the information
|
||||||
of the functions called within a program that allows transfer of the application
|
of the functions called within a program that allows transfer of the application
|
||||||
control from these functions to the main process after code inside the functions
|
control from these functions to the main process after code inside the functions
|
||||||
has been executed.
|
has been executed.
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags:
|
||||||
|
|
||||||
# Capturing user input in Bash
|
# Capturing user input in Bash
|
||||||
|
|
||||||
We use [read](/Programming_Languages/Shell/Read.md) to gather user input.
|
We use [read](Read.md) to gather user input.
|
||||||
|
|
||||||
## Capturing raw inputs
|
## Capturing raw inputs
|
||||||
|
|
||||||
|
|
@ -91,7 +91,7 @@ echo "$fave was selected"
|
||||||
### Check right number of arguments supplied
|
### Check right number of arguments supplied
|
||||||
|
|
||||||
Here we test that the right number of
|
Here we test that the right number of
|
||||||
[arguments](/Programming_Languages/Shell/Passing_arguments_and_options_to_Bash_scripts.md)
|
[arguments](Passing_arguments_and_options_to_Bash_scripts.md)
|
||||||
have been passed to the script:
|
have been passed to the script:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [physics, electricity]
|
||||||
# Cells and batteries
|
# Cells and batteries
|
||||||
|
|
||||||
Cells are a
|
Cells are a
|
||||||
[voltage source](/Electronics_and_Hardware/Analogue_circuits/Voltage.md) that
|
[voltage source](Voltage.md) that
|
||||||
generate a difference of potential via a positive and negative electrode
|
generate a difference of potential via a positive and negative electrode
|
||||||
separated by an electrolytic solution. The electrolytes pull free electrons from
|
separated by an electrolytic solution. The electrolytes pull free electrons from
|
||||||
one of the materials which creates a positive charge. The other material gains
|
one of the materials which creates a positive charge. The other material gains
|
||||||
|
|
@ -48,7 +48,7 @@ line.
|
||||||
In this configuration the same current flows through all the cells; it is not
|
In this configuration the same current flows through all the cells; it is not
|
||||||
cumulative. We represent this as follow> However the voltage is cumulative: it
|
cumulative. We represent this as follow> However the voltage is cumulative: it
|
||||||
is the _sum_ of the individual cell voltages, represented below as
|
is the _sum_ of the individual cell voltages, represented below as
|
||||||
[electrical field](/Electronics_and_Hardware/Analogue_circuits/Voltage.md#distinguishing-voltage-from-electric-field):
|
[electrical field](Voltage.md#distinguishing-voltage-from-electric-field):
|
||||||
|
|
||||||
$$
|
$$
|
||||||
E_{T} = E_{1} + E_{2} + E_{3} \\
|
E_{T} = E_{1} + E_{2} + E_{3} \\
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ git cherry-pick abcdefg hijklmn opqrst
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
- You don't have to just cherry-pick locally, you can also cherry-pick from a
|
- You don't have to just cherry-pick locally, you can also cherry-pick from a
|
||||||
[remote tracking branch](/DevOps/Git/Remote_tracking_branches.md).
|
[remote tracking branch](Remote_tracking_branches.md).
|
||||||
- You cannot cherry-pick merge commits since these commits do not implement a
|
- You cannot cherry-pick merge commits since these commits do not implement a
|
||||||
set of changes, they are connecting commits.
|
set of changes, they are connecting commits.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ A **controller** is simply a circuit that controls a process. The **chipset** is
|
||||||
a combination of controllers placed on the same piece of silicon.
|
a combination of controllers placed on the same piece of silicon.
|
||||||
|
|
||||||
The chipset manages the data flow between the different components that comprise
|
The chipset manages the data flow between the different components that comprise
|
||||||
the [motherboard](/Electronics_and_Hardware/Motherboard.md): processor,
|
the [motherboard](Motherboard.md): processor,
|
||||||
[memory](/Computer_Architecture/Memory/Memory.md),
|
[memory](Memory.md),
|
||||||
[harddisk](/Operating_Systems/Disks/What_are_disks.md) and peripherals.
|
[harddisk](What_are_disks.md) and peripherals.
|
||||||
|
|
||||||
Buses run in and out of the chipset into these key motherboard components. The
|
Buses run in and out of the chipset into these key motherboard components. The
|
||||||
main chipset is a kind of junction that sits between the memory and CPU through
|
main chipset is a kind of junction that sits between the memory and CPU through
|
||||||
which the [system bus](/Computer_Architecture/Bus.md) passes.
|
which the [system bus](Bus.md) passes.
|
||||||
|
|
||||||
The chipset is sometimes called the "glue" or "traffic controller" of the
|
The chipset is sometimes called the "glue" or "traffic controller" of the
|
||||||
motherboard or _an intelligent intersection of buses_.
|
motherboard or _an intelligent intersection of buses_.
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@ that current flows in a loop from a voltage source, through the circuit elements
|
||||||
and back to the voltage source.
|
and back to the voltage source.
|
||||||
|
|
||||||
Below is a basic circuit representing a 9-volt
|
Below is a basic circuit representing a 9-volt
|
||||||
[battery](/Electronics_and_Hardware/Analogue_circuits/Cells_and_batteries.md#cells-and-batteries)
|
[battery](Cells_and_batteries.md#cells-and-batteries)
|
||||||
with a 10,000$\Omega$
|
with a 10,000$\Omega$
|
||||||
[resistor](/Electronics_and_Hardware/Analogue_circuits/Resistance.md) attached
|
[resistor](Resistance.md) attached
|
||||||
accross its terminals. Through the application of
|
accross its terminals. Through the application of
|
||||||
[Ohm's Law](/Electronics_and_Hardware/Physics_of_electricity/Ohms_Law.md) we can
|
[Ohm's Law](Ohms_Law.md) we can
|
||||||
determine that the maximum current will be 0.9 miliamps.
|
determine that the maximum current will be 0.9 miliamps.
|
||||||
|
|
||||||

|

|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ constructor with `super`.
|
||||||
|
|
||||||
You shouldn't confuse `implements` with `extends`. `implements` just checks the
|
You shouldn't confuse `implements` with `extends`. `implements` just checks the
|
||||||
class as an interface in accordance with the principles of
|
class as an interface in accordance with the principles of
|
||||||
[duck typing](/Programming_Languages/TypeScript/Custom_types.md#duck-typing):
|
[duck typing](Custom_types.md#duck-typing):
|
||||||
i.e the implementing class should have the same properties and methods. It
|
i.e the implementing class should have the same properties and methods. It
|
||||||
doesn't affect anything internal to the methods or properties. So e.g, if you
|
doesn't affect anything internal to the methods or properties. So e.g, if you
|
||||||
typed a method parameter as `string` in the base class, this would still default
|
typed a method parameter as `string` in the base class, this would still default
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ class Person:
|
||||||
## Object references
|
## Object references
|
||||||
|
|
||||||
When you log a class you get a reference to its hexadecimal
|
When you log a class you get a reference to its hexadecimal
|
||||||
[memory](/Computer_Architecture/Memory/Memory.md) reference.
|
[memory](Memory.md) reference.
|
||||||
|
|
||||||
```py
|
```py
|
||||||
p1 = Person('John', 36)
|
p1 = Person('John', 36)
|
||||||
|
|
@ -112,7 +112,7 @@ print(id(p2))
|
||||||
## Copying objects
|
## Copying objects
|
||||||
|
|
||||||
The same principle that applies to
|
The same principle that applies to
|
||||||
[copying functions](/Programming_Languages/Python/Syntax/Functions_in_Python.md)
|
[copying functions](Functions_in_Python.md)
|
||||||
applies to copying objects created through classes: redeclaration results in a
|
applies to copying objects created through classes: redeclaration results in a
|
||||||
duplicate entity. Thus changes to the duplicate will affect the original.
|
duplicate entity. Thus changes to the duplicate will affect the original.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ tags: [binary, memory, clock, electromagnetism]
|
||||||
# Clock signals
|
# Clock signals
|
||||||
|
|
||||||
In the examples of digital circuits so far (i.e
|
In the examples of digital circuits so far (i.e
|
||||||
[adders](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md)
|
[adders](Half_adder_and_full_adder.md)
|
||||||
and [latches](/Electronics_and_Hardware/Digital_circuits/Latches.md)) everything
|
and [latches](Latches.md)) everything
|
||||||
happens in a single instant or over several repeated instances. This is because
|
happens in a single instant or over several repeated instances. This is because
|
||||||
of how simple the circuits are. In the case of latches only a single bit is
|
of how simple the circuits are. In the case of latches only a single bit is
|
||||||
updated. And even with rippled adders they are just a series of 1-bit updaters
|
updated. And even with rippled adders they are just a series of 1-bit updaters
|
||||||
|
|
@ -22,7 +22,7 @@ We do this by sequencing the execution with the pulses of the system clock.
|
||||||
|
|
||||||
A single iteration of the volatage rising and falling is a **pulse**. A complete
|
A single iteration of the volatage rising and falling is a **pulse**. A complete
|
||||||
oscillation from low to high and back to low is a **cycle**. As with all
|
oscillation from low to high and back to low is a **cycle**. As with all
|
||||||
[electromagnetic](/Electronics_and_Hardware/Physics_of_electricity/Electromagnetism.md)
|
[electromagnetic](Electromagnetism.md)
|
||||||
signals we measure the frequency of the wave in Hertz: cylcles per second. We
|
signals we measure the frequency of the wave in Hertz: cylcles per second. We
|
||||||
also further distinguish the rising and falling edge of a pulse. Rising
|
also further distinguish the rising and falling edge of a pulse. Rising
|
||||||
represents the signal passing from ground to its maximum voltage and falling is
|
represents the signal passing from ground to its maximum voltage and falling is
|
||||||
|
|
@ -44,6 +44,6 @@ The diagram below shows a pulse cycle of 2Hz.
|
||||||
edge-triggered**
|
edge-triggered**
|
||||||
|
|
||||||
The role of the clock is essential in the functioning of the
|
The role of the clock is essential in the functioning of the
|
||||||
[CPU](/Computer_Architecture/CPU/CPU_architecture.md#the-system-clock). It is
|
[CPU](CPU_architecture.md#the-system-clock). It is
|
||||||
the system clock that gives CPUs their performance rating: how many processes
|
the system clock that gives CPUs their performance rating: how many processes
|
||||||
can execute within a given clock cycle.
|
can execute within a given clock cycle.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ tags:
|
||||||
# Components
|
# Components
|
||||||
|
|
||||||
We write functional components in the manner of a normal
|
We write functional components in the manner of a normal
|
||||||
[function](/Programming_Languages/React/React_Typescript/Functions.md) that take
|
[function](Functions.md) that take
|
||||||
a props argument and return a JSX element.
|
a props argument and return a JSX element.
|
||||||
|
|
||||||
```jsx
|
```jsx
|
||||||
|
|
|
||||||
|
|
@ -70,4 +70,4 @@ function components.
|
||||||
|
|
||||||
We change components by using state, not by mutating props. This is consistent
|
We change components by using state, not by mutating props. This is consistent
|
||||||
with React's
|
with React's
|
||||||
[principle of the immutability of elements](https://www.notion.so/Elements-992594b9cd2e483c85cddddffeb16f11).
|
[principle of the immutability of elements](Elements-992594b9cd2e483c85cddddffeb16f11).
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ tags: [docker, SQL, node-js]
|
||||||
# Connecting a frontend to a Docker backend
|
# Connecting a frontend to a Docker backend
|
||||||
|
|
||||||
Building on from
|
Building on from
|
||||||
[NodeJS backend with MySQL database](/DevOps/Docker/Docker_Examples/Node_and_MySQL_db.md)
|
[NodeJS backend with MySQL database](Node_and_MySQL_db.md)
|
||||||
we can add a frontend by adapting the existing
|
we can add a frontend by adapting the existing
|
||||||
[Docker Compose](/DevOps/Docker/Docker_Compose.md) files (one for each
|
[Docker Compose](Docker_Compose.md) files (one for each
|
||||||
environment) to accept an additional dependency.
|
environment) to accept an additional dependency.
|
||||||
|
|
||||||
We won't create a container for the frontend as this is not necessary.
|
We won't create a container for the frontend as this is not necessary.
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ increased the speed of transport.
|
||||||
particular implementation of containerization that simplifies the process and
|
particular implementation of containerization that simplifies the process and
|
||||||
bases it on a standardised specification.
|
bases it on a standardised specification.
|
||||||
|
|
||||||
- Containers are native to the Linux [kernal](/Operating_Systems/The_Kernel.md)
|
- Containers are native to the Linux [kernal](The_Kernel.md)
|
||||||
and are key part of how it works. Thus when you run containers on Linux, you
|
and are key part of how it works. Thus when you run containers on Linux, you
|
||||||
are using native capability. When you use containers on Windows or Mac you
|
are using native capability. When you use containers on Windows or Mac you
|
||||||
have to run a virtual version of Linux in order to exploit the capabilities of
|
have to run a virtual version of Linux in order to exploit the capabilities of
|
||||||
|
|
@ -53,7 +53,7 @@ groups).
|
||||||
example a container is ignorant of the underlying operating system and
|
example a container is ignorant of the underlying operating system and
|
||||||
network, by default.
|
network, by default.
|
||||||
|
|
||||||
In ordinary [user space](/Operating_Systems/User_Space.md) applications share
|
In ordinary [user space](User_Space.md) applications share
|
||||||
the _same_ processor, memory and file system resources. This increases the
|
the _same_ processor, memory and file system resources. This increases the
|
||||||
likelihood of resourcing challenges, dependency conflicts and security threats.
|
likelihood of resourcing challenges, dependency conflicts and security threats.
|
||||||
Without modularisation and the titration of resources, you are opened up to much
|
Without modularisation and the titration of resources, you are opened up to much
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ We create tables in an SQL database with the `CREATE` command.
|
||||||
|
|
||||||
Below is an example of this in practice. Each field corresponds to a column. We
|
Below is an example of this in practice. Each field corresponds to a column. We
|
||||||
specify the name of the field and its corresponding
|
specify the name of the field and its corresponding
|
||||||
[data type](/Databases/SQL/Data_types_in_MySQL.md). Every table must have a
|
[data type](Data_types_in_MySQL.md). Every table must have a
|
||||||
**primary key**. In the example, `employee_id` is the primary key.
|
**primary key**. In the example, `employee_id` is the primary key.
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ tags: [mongo-db, node-js, mongoose]
|
||||||
## Schema
|
## Schema
|
||||||
|
|
||||||
In order start adding
|
In order start adding
|
||||||
[collections and documents](/Databases/MongoDB/Introduction.md) to our database,
|
[collections and documents](Introduction.md) to our database,
|
||||||
we use Mongoose's **schema** structure. (This is specific to Mongoose and is not
|
we use Mongoose's **schema** structure. (This is specific to Mongoose and is not
|
||||||
a structure that is a part of Mongo in general.)
|
a structure that is a part of Mongo in general.)
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ The following data types are available:
|
||||||
|
|
||||||
> Note that we set our validation criteria as the second property for each
|
> Note that we set our validation criteria as the second property for each
|
||||||
> schema value. There is more info info on validation in a
|
> schema value. There is more info info on validation in a
|
||||||
> [separate entry](/Databases/MongoDB/Validating_Mongoose_schemas.md);
|
> [separate entry](Validating_Mongoose_schemas.md);
|
||||||
|
|
||||||
## Models
|
## Models
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ tags: [logic-gates, binary, memory]
|
||||||
# Creating memory with NAND gates
|
# Creating memory with NAND gates
|
||||||
|
|
||||||
The
|
The
|
||||||
[logic circuit](/Electronics_and_Hardware/Digital_circuits/Digital_circuits.md)
|
[logic circuit](Digital_circuits.md)
|
||||||
below demonstrates how memory can be created using
|
below demonstrates how memory can be created using
|
||||||
[NAND](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#nand-gate)
|
[NAND](Logic_gates.md#nand-gate)
|
||||||
gates. A single bit is stored in memory.
|
gates. A single bit is stored in memory.
|
||||||
|
|
||||||
 Interactive version of circuit:
|
 Interactive version of circuit:
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,12 @@ So current is the flow of electrons. Charge is the quantity that flows.
|
||||||
## Why current exists
|
## Why current exists
|
||||||
|
|
||||||
Current exists because of the
|
Current exists because of the
|
||||||
[first law of electrostatics](/Electronics_and_Hardware/Physics_of_electricity/Coulombs_Laws.md).
|
[first law of electrostatics](Coulombs_Laws.md).
|
||||||
|
|
||||||
When there is an excess of electrons at one terminal (i.e. negatively charged
|
When there is an excess of electrons at one terminal (i.e. negatively charged
|
||||||
atoms) and a deficiency of electrons at the other terminal (i.e. positively
|
atoms) and a deficiency of electrons at the other terminal (i.e. positively
|
||||||
charged atoms), a
|
charged atoms), a
|
||||||
[_difference of potential_](/Electronics_and_Hardware/Analogue_circuits/Voltage.md)
|
[_difference of potential_](Voltage.md)
|
||||||
exists between the two terminals.
|
exists between the two terminals.
|
||||||
|
|
||||||
When the terminals are connected to each other via a conductor (e.g. copper
|
When the terminals are connected to each other via a conductor (e.g. copper
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags:
|
||||||
|
|
||||||
# Custom types
|
# Custom types
|
||||||
|
|
||||||
Objects and [classes](./Classes.md) are where TypeScript becomes most useful and
|
Objects and [classes](Classes.md) are where TypeScript becomes most useful and
|
||||||
powerful. In TypeScript, objects and classes are by definition custom types.
|
powerful. In TypeScript, objects and classes are by definition custom types.
|
||||||
|
|
||||||
When typing objects, you do not write the types alongside the actual data as you
|
When typing objects, you do not write the types alongside the actual data as you
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags: []
|
||||||
|
|
||||||
DeMorgan's laws express some fundamental equivalences that obtain between the
|
DeMorgan's laws express some fundamental equivalences that obtain between the
|
||||||
Boolean
|
Boolean
|
||||||
[connectives](/Logic/Propositional_logic/Truth-functional_connectives.md).
|
[connectives](Truth-functional_connectives.md).
|
||||||
|
|
||||||
## First Law
|
## First Law
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ single set of tasks according to prewritten instructions. We’ll take the term
|
||||||
_computer_ to mean general purpose computer.
|
_computer_ to mean general purpose computer.
|
||||||
|
|
||||||
Simplified model of what a computer is:
|
Simplified model of what a computer is:
|
||||||

|

|
||||||
|
|
||||||
Although the input, output and storage parts of a computer are very important,
|
Although the input, output and storage parts of a computer are very important,
|
||||||
they will not be the focus of this course. Instead we are going to learn all
|
they will not be the focus of this course. Instead we are going to learn all
|
||||||
|
|
@ -28,7 +28,7 @@ instructions to make calculations.
|
||||||
|
|
||||||
### Early computing (_Crash Course Computer Science)_
|
### Early computing (_Crash Course Computer Science)_
|
||||||
|
|
||||||
[Early Computing: Crash Course Computer Science #1](https://www.youtube.com/watch?v=O5nskjZ_GoI)
|
[Early Computing: Crash Course Computer Science #1](watch?v=O5nskjZ_GoI)
|
||||||
|
|
||||||
- The abacus was created because the scale of society had become greater than
|
- The abacus was created because the scale of society had become greater than
|
||||||
what a single person could create and manipulate in their mind.
|
what a single person could create and manipulate in their mind.
|
||||||
|
|
@ -57,9 +57,9 @@ instructions to make calculations.
|
||||||
wind, drift, slope and elevation. These were used well into WW2 but they were
|
wind, drift, slope and elevation. These were used well into WW2 but they were
|
||||||
limited to the particular type of cannon or shell
|
limited to the particular type of cannon or shell
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
> Before the invention of actual computers, 'computer' was a job-title denoting
|
> Before the invention of actual computers, 'computer' was a job-title denoting
|
||||||
> people who were employed to conduct complex calculations, sometimes with the
|
> people who were employed to conduct complex calculations, sometimes with the
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ tags:
|
||||||
|
|
||||||
Devices are hardware that require access to the CPU in order to function.
|
Devices are hardware that require access to the CPU in order to function.
|
||||||
Devices can either be external and plugged-in or internal to the motherboard.
|
Devices can either be external and plugged-in or internal to the motherboard.
|
||||||
The most common type of device that you will work with are [disks](./Disks.md).
|
The most common type of device that you will work with are [disks](Disks.md).
|
||||||
|
|
||||||
Devices are files but they have some different capabilities than ordinaryq
|
Devices are files but they have some different capabilities than ordinaryq
|
||||||
files. There are two types: **block** and **stream**. Device files reside in the
|
files. There are two types: **block** and **stream**. Device files reside in the
|
||||||
|
|
@ -45,7 +45,7 @@ brw-rw---- 1 root disk 259, 3 Jun 4 11:00 nvme0n1p3
|
||||||
> programs like `ls` and `cat`.
|
> programs like `ls` and `cat`.
|
||||||
|
|
||||||
The
|
The
|
||||||
[mode](/Programming_Languages/Shell_Scripting/File_permissions_and_execution.md#what-the-output-means)
|
[mode](File_permissions_and_execution.md#what-the-output-means)
|
||||||
is different from ordinary files. Each device file is prepended with
|
is different from ordinary files. Each device file is prepended with
|
||||||
`b, p, c, s` before the standard permissions. These stand for the major types of
|
`b, p, c, s` before the standard permissions. These stand for the major types of
|
||||||
devices: _block, character, pipe_ and _socket_.
|
devices: _block, character, pipe_ and _socket_.
|
||||||
|
|
@ -65,7 +65,7 @@ devices: _block, character, pipe_ and _socket_.
|
||||||
|
|
||||||
`/dev/null` is a virtual device: it doesn't actually exist as a piece of
|
`/dev/null` is a virtual device: it doesn't actually exist as a piece of
|
||||||
hardware on the system. It can be useful when
|
hardware on the system. It can be useful when
|
||||||
[bash scripting](/Programming_Languages/Shell/Redirect_to_dev_null.md) as a
|
[bash scripting](Redirect_to_dev_null.md) as a
|
||||||
place to direct output that you don't care about, for example errors or verbose
|
place to direct output that you don't care about, for example errors or verbose
|
||||||
program read-outs.
|
program read-outs.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ tags: [circuits]
|
||||||
# Digital circuits
|
# Digital circuits
|
||||||
|
|
||||||
Ultimately every process in a computer is the product of a digital
|
Ultimately every process in a computer is the product of a digital
|
||||||
[circuit](/Electronics_and_Hardware/Analogue_circuits/Circuits.md) that is
|
[circuit](Circuits.md) that is
|
||||||
working on binary values. In contrast to electrical circuits, digital circuits
|
working on binary values. In contrast to electrical circuits, digital circuits
|
||||||
are not represented in an
|
are not represented in an
|
||||||
[analogue](/Electronics_and_Hardware/Analogue_and_digital.md) fashion.
|
[analogue](Analogue_and_digital.md) fashion.
|
||||||
|
|
||||||
Analogue circuits work on the basis of real continuous phenomena in the world:
|
Analogue circuits work on the basis of real continuous phenomena in the world:
|
||||||
charges and currents. As a result, the key properties of a circuit - voltage,
|
charges and currents. As a result, the key properties of a circuit - voltage,
|
||||||
|
|
@ -21,7 +21,7 @@ natural flow of current and ensure that it only runs within desired parameters.
|
||||||
In a standard electrical circuit, voltage, current and resistance can vary over
|
In a standard electrical circuit, voltage, current and resistance can vary over
|
||||||
a wide range of values however in the binary context we want to deal with
|
a wide range of values however in the binary context we want to deal with
|
||||||
discrete values (zeros and ones) which can be fed into the various
|
discrete values (zeros and ones) which can be fed into the various
|
||||||
[logic gates](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md).
|
[logic gates](Logic_gates.md).
|
||||||
|
|
||||||
We therefore need a way to represent 'on' and 'off' as single quantities. We do
|
We therefore need a way to represent 'on' and 'off' as single quantities. We do
|
||||||
this by stipulating that a given voltage corresponds to 'on' (high) and another
|
this by stipulating that a given voltage corresponds to 'on' (high) and another
|
||||||
|
|
@ -31,6 +31,6 @@ voltage is inherently analogue but we basically binary-encode them. Formally
|
||||||
be within 2-5V depending on the circuit design and anything between 0 - 0.8V is
|
be within 2-5V depending on the circuit design and anything between 0 - 0.8V is
|
||||||
considered off.
|
considered off.
|
||||||
|
|
||||||
The [transistor](/Electronics_and_Hardware/Digital_circuits/Transistors.md) is
|
The [transistor](Transistors.md) is
|
||||||
the electrical component that enables us to represent given voltage ranges as
|
the electrical component that enables us to represent given voltage ranges as
|
||||||
being 'on' or 'off'.
|
being 'on' or 'off'.
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,16 @@ tags:
|
||||||
|
|
||||||
Suppose you have the following shape:
|
Suppose you have the following shape:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
One part is shaded. This represents one-eighth of the original shape.
|
One part is shaded. This represents one-eighth of the original shape.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Now imagine there are four instances of the shape and one-eighth remains shaded.
|
Now imagine there are four instances of the shape and one-eighth remains shaded.
|
||||||
How man one-eighths are there in four?
|
How man one-eighths are there in four?
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The shaded proportion represents $\frac{1}{8}$ of the shape. Imagine four of
|
The shaded proportion represents $\frac{1}{8}$ of the shape. Imagine four of
|
||||||
these shapes, how many eighths are there?
|
these shapes, how many eighths are there?
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,4 @@ services:
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
[NodeJS and MySQL Docker backend](/DevOps/Docker/Docker_Examples/Node_and_MySQL_db.md)
|
[NodeJS and MySQL Docker backend](Node_and_MySQL_db.md)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ tags: [docker, containerization]
|
||||||

|

|
||||||
|
|
||||||
- The Docker Client is a thin API for making
|
- The Docker Client is a thin API for making
|
||||||
[REST API](/Databases/REST/RESTful_APIs.md) to the Docker Server. Any CLI
|
[REST API](RESTful_APIs.md) to the Docker Server. Any CLI
|
||||||
command beginning `docker...` is an API request to the server.
|
command beginning `docker...` is an API request to the server.
|
||||||
- The internal process name for the server is `dockerd`.
|
- The internal process name for the server is `dockerd`.
|
||||||
- On `docker run...`, `dockerd` calls `containerd`. This process starts the
|
- On `docker run...`, `dockerd` calls `containerd`. This process starts the
|
||||||
|
|
|
||||||
|
|
@ -62,4 +62,4 @@ containers can be launched from the same, single image.
|
||||||
|
|
||||||
## Docker architectural overview
|
## Docker architectural overview
|
||||||
|
|
||||||
See [Docker architecture](/DevOps/Docker/Docker_architecture.md).
|
See [Docker architecture](Docker_architecture.md).
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ currents.
|
||||||
|
|
||||||
> Magnetism is a physical property produced by the _motion_ of electric charge,
|
> Magnetism is a physical property produced by the _motion_ of electric charge,
|
||||||
> which of course, is the same thing as
|
> which of course, is the same thing as
|
||||||
> [electric current](/Electronics_and_Hardware/Analogue_circuits/Current.md)
|
> [electric current](Current.md)
|
||||||
|
|
||||||
A **magnet** is a material or object that produces a magnetic field. This field
|
A **magnet** is a material or object that produces a magnetic field. This field
|
||||||
is invisible but visible by its effects: pulling on other magnetic materials
|
is invisible but visible by its effects: pulling on other magnetic materials
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ spawned instances? Is this even possible or do they die on `exit` .
|
||||||
session. It contains variables that define system properties.
|
session. It contains variables that define system properties.
|
||||||
|
|
||||||
- Every time a
|
- Every time a
|
||||||
[shell session](https://www.notion.so/Shell-sessions-e6dd743dec1d4fe3b1ee672c8f9731f6)
|
[shell session](Shell-sessions-e6dd743dec1d4fe3b1ee672c8f9731f6)
|
||||||
spawns, a process takes place to gather and compile information that should be
|
spawns, a process takes place to gather and compile information that should be
|
||||||
available to the shell process and its child processes. It obtains the data
|
available to the shell process and its child processes. It obtains the data
|
||||||
for these settings from a variety of different files and settings on the
|
for these settings from a variety of different files and settings on the
|
||||||
|
|
@ -155,7 +155,7 @@ variables use `set` .
|
||||||
You can also add variables to config files that run on login such as your user
|
You can also add variables to config files that run on login such as your user
|
||||||
`.bashrc` / `.zshrc` . This is obviously best for when you want the variables to
|
`.bashrc` / `.zshrc` . This is obviously best for when you want the variables to
|
||||||
persist and be accessible within every
|
persist and be accessible within every
|
||||||
[shell session](https://www.notion.so/Shell-sessions-e6dd743dec1d4fe3b1ee672c8f9731f6).
|
[shell session](Shell-sessions-e6dd743dec1d4fe3b1ee672c8f9731f6).
|
||||||
|
|
||||||
## Important environmental and shell variables
|
## Important environmental and shell variables
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ tags:
|
||||||
Two fractions are equivalent if they represent the same value. To begin with we
|
Two fractions are equivalent if they represent the same value. To begin with we
|
||||||
can represent this visually:
|
can represent this visually:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
_Each shaded area is taking up the same proportion of the whole._
|
_Each shaded area is taking up the same proportion of the whole._
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,4 @@ Once the data is returned, React tries to update the state but the component is
|
||||||
unmounted.
|
unmounted.
|
||||||
|
|
||||||
As the warning suggests, this can be resolved using the cleanup parameter within
|
As the warning suggests, this can be resolved using the cleanup parameter within
|
||||||
[useEffect](../../Programming_Languages/React/Hooks/useEffect.md#cleanup-functions).
|
[useEffect](useEffect.md#cleanup-functions).
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ If there was only one thread, this would be inefficient and unworkable.
|
||||||
Therefore the framework will be multi-threaded: multiple request-response cycles
|
Therefore the framework will be multi-threaded: multiple request-response cycles
|
||||||
can be executed at once by different threads.
|
can be executed at once by different threads.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
To accomodate the ability to increase the scale of synchronous applications you
|
To accomodate the ability to increase the scale of synchronous applications you
|
||||||
need to be able to spawn more threads commensurate to increased demand. This
|
need to be able to spawn more threads commensurate to increased demand. This
|
||||||
|
|
@ -46,7 +46,7 @@ dispatching them asynchronously. When a request is made it sends it off and
|
||||||
continues with its execution and handling new requests. Once these resolve, the
|
continues with its execution and handling new requests. Once these resolve, the
|
||||||
data is returned to the main thread.
|
data is returned to the main thread.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## The Event Loop
|
## The Event Loop
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ Node is continually monitoring the Event Loop in the background.
|
||||||
|
|
||||||
A running Node application is a single running process. Like everything that
|
A running Node application is a single running process. Like everything that
|
||||||
happens within the OS, a process is managed by the
|
happens within the OS, a process is managed by the
|
||||||
[kernel](/Operating_Systems/The_Kernel.md) that dispatches operations to the CPU
|
[kernel](The_Kernel.md) that dispatches operations to the CPU
|
||||||
in a clock cycle. A thread is a sequence of code that resides within the process
|
in a clock cycle. A thread is a sequence of code that resides within the process
|
||||||
and utilises its memory pool (the amount of memory assigned by the kernel to the
|
and utilises its memory pool (the amount of memory assigned by the kernel to the
|
||||||
Node process). The Event Loop runs on CPU ticks: a tick is a single run of the
|
Node process). The Event Loop runs on CPU ticks: a tick is a single run of the
|
||||||
|
|
@ -75,7 +75,7 @@ These six phases create one cycle, or loop, equal to one **tick**. A Node.js
|
||||||
process exits when there is no more pending work in the Event Loop, or when
|
process exits when there is no more pending work in the Event Loop, or when
|
||||||
`process.exit()` is called manually. A program only runs for as long as there
|
`process.exit()` is called manually. A program only runs for as long as there
|
||||||
are tasks queued in the Event Loop, or present on the
|
are tasks queued in the Event Loop, or present on the
|
||||||
[call stack](/Software_Engineering/Call_stack.md).
|
[call stack](Call_stack.md).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -93,7 +93,7 @@ The phases are as follows:
|
||||||
are currently set. The Event Loop takes the timer with the shortest wait
|
are currently set. The Event Loop takes the timer with the shortest wait
|
||||||
time and compares it with the Event Loop's current time. If the wait time
|
time and compares it with the Event Loop's current time. If the wait time
|
||||||
has elapsed, then the timer's callback is queued to be called once the
|
has elapsed, then the timer's callback is queued to be called once the
|
||||||
[call stack](/Software_Engineering/Call_stack.md) is empty.
|
[call stack](Call_stack.md) is empty.
|
||||||
2. **I/O Callbacks**
|
2. **I/O Callbacks**
|
||||||
- Once timers have been checked and scheduled, Node jumps to I/O operations.
|
- Once timers have been checked and scheduled, Node jumps to I/O operations.
|
||||||
- Node implements a non-blocking input/output interface. This is to say,
|
- Node implements a non-blocking input/output interface. This is to say,
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ return (
|
||||||
```
|
```
|
||||||
|
|
||||||
This follows standard practise for
|
This follows standard practise for
|
||||||
[controlled-components](/Programming_Languages/React/Hooks/Forms.md). The TS
|
[controlled-components](Forms.md). The TS
|
||||||
specific additions:
|
specific additions:
|
||||||
|
|
||||||
- We define the change event as being of the type `React.ChangeEvent` and state
|
- We define the change event as being of the type `React.ChangeEvent` and state
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ the second list against them.
|
||||||
## Parameter expansion: `${...}`
|
## Parameter expansion: `${...}`
|
||||||
|
|
||||||
We use most frequently for returning the value of stored
|
We use most frequently for returning the value of stored
|
||||||
[variables](/Programming_Languages/Shell/Variables_and_data_types.md).
|
[variables](Variables_and_data_types.md).
|
||||||
Techically we do not have to use the braces, we can retrieve with just `$var`
|
Techically we do not have to use the braces, we can retrieve with just `$var`
|
||||||
however it's better to use them to minimise interpretation fuck-ups which happen
|
however it's better to use them to minimise interpretation fuck-ups which happen
|
||||||
a lot.
|
a lot.
|
||||||
|
|
@ -93,7 +93,7 @@ returned such as only returning from the 6th character: `${var:6}`.
|
||||||
|
|
||||||
Command substitution (circle-brackets) allows us to put the output of one
|
Command substitution (circle-brackets) allows us to put the output of one
|
||||||
command inside another. Bash runs the bracketed command in a
|
command inside another. Bash runs the bracketed command in a
|
||||||
[sub-shell](/Programming_Languages/Shell/Shell_sessions.md) and then returns it
|
[sub-shell](Shell_sessions.md) and then returns it
|
||||||
to the main user shell.
|
to the main user shell.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
@ -107,5 +107,5 @@ echo "The current directory is $(pwd)."
|
||||||
We use arithmetic expansion when we want to calculate numerical values
|
We use arithmetic expansion when we want to calculate numerical values
|
||||||
|
|
||||||
See
|
See
|
||||||
[Working with numbers in Bash](/Programming_Languages/Shell/Working_with_numbers_in_Bash.md)
|
[Working with numbers in Bash](Working_with_numbers_in_Bash.md)
|
||||||
for more.
|
for more.
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags: [CPU]
|
||||||
|
|
||||||
_Fetch, decode, execute_ is the operating cycle of the CPU. We will run through
|
_Fetch, decode, execute_ is the operating cycle of the CPU. We will run through
|
||||||
how this works with reference to the
|
how this works with reference to the
|
||||||
[CPU architecture](/Computer_Architecture/CPU/CPU_architecture.md).
|
[CPU architecture](CPU_architecture.md).
|
||||||
|
|
||||||
## Fetch
|
## Fetch
|
||||||
|
|
||||||
|
|
@ -59,9 +59,9 @@ to determine which of its circuits should be used for processing.
|
||||||
Now the command will be executed. The operand is copied to the Memory Address
|
Now the command will be executed. The operand is copied to the Memory Address
|
||||||
Register and then passed to the Memory Data Register and the command is carried
|
Register and then passed to the Memory Data Register and the command is carried
|
||||||
out by the ALU. The activities of ALU are covered in
|
out by the ALU. The activities of ALU are covered in
|
||||||
[CPU Architecture](/Computer_Architecture/CPU/CPU_architecture.md#arithmetic-logic-unit)
|
[CPU Architecture](CPU_architecture.md#arithmetic-logic-unit)
|
||||||
and the notes on
|
and the notes on
|
||||||
[Logic Gates](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md).
|
[Logic Gates](Logic_gates.md).
|
||||||
|
|
||||||
## Store
|
## Store
|
||||||
|
|
||||||
|
|
@ -76,7 +76,7 @@ specify where to store the result.
|
||||||
- If the instruction is iterative (e.g. adding two numbers and then multiplying
|
- If the instruction is iterative (e.g. adding two numbers and then multiplying
|
||||||
by another number), the instruction will tell the CPU to store the interim
|
by another number), the instruction will tell the CPU to store the interim
|
||||||
first value in the CPU's
|
first value in the CPU's
|
||||||
[registers](/Computer_Architecture/CPU/CPU_architecture.md#registers). As
|
[registers](CPU_architecture.md#registers). As
|
||||||
these are part of the CPU, the data can be retrieved more readily. If the
|
these are part of the CPU, the data can be retrieved more readily. If the
|
||||||
value is not expected to be used again immediately, it goes to the DRAM or
|
value is not expected to be used again immediately, it goes to the DRAM or
|
||||||
harddisk.
|
harddisk.
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ File descriptors are shorthand for `stdin`, `stdout` and `stderr`:
|
||||||
| 2 | Standard error | `stderr` |
|
| 2 | Standard error | `stderr` |
|
||||||
|
|
||||||
They are typically used when you want to
|
They are typically used when you want to
|
||||||
[redirect](/Programming_Languages/Shell/Redirection.md) the output of the
|
[redirect](Redirection.md) the output of the
|
||||||
standard/input /output/error somewhere, e.g a file or as input to another
|
standard/input /output/error somewhere, e.g a file or as input to another
|
||||||
program. A classic case is `[some_command] > /dev/null 2>&1`
|
program. A classic case is `[some_command] > /dev/null 2>&1`
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ They are all technically "files" which are open and which append themselves to
|
||||||
every process that can run in the shell. For any command or program that you
|
every process that can run in the shell. For any command or program that you
|
||||||
run, you will be able to access `0`, `1` and `2` for them. In this way they are
|
run, you will be able to access `0`, `1` and `2` for them. In this way they are
|
||||||
similar to variables like
|
similar to variables like
|
||||||
[`$0`](/Programming_Languages/Shell/Passing_arguments_and_options_to_Bash_scripts.md#passing-arguments)
|
[`$0`](Passing_arguments_and_options_to_Bash_scripts.md#passing-arguments)
|
||||||
and
|
and
|
||||||
[`$@`](/Programming_Languages/Shell/Passing_arguments_and_options_to_Bash_scripts.md#passing-arguments).
|
[`$@`](Passing_arguments_and_options_to_Bash_scripts.md#passing-arguments).
|
||||||
They have a universal meaning within the context of the shell runtime.
|
They have a universal meaning within the context of the shell runtime.
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ is:
|
||||||
If you are working solo and not with group access to files, you can disregard
|
If you are working solo and not with group access to files, you can disregard
|
||||||
assigning the other numerals, by putting zeros in as placeholders.
|
assigning the other numerals, by putting zeros in as placeholders.
|
||||||
|
|
||||||
[Permission codes](https://www.notion.so/685254916b2642f189e6316b876e09c9)
|
[Permission codes](685254916b2642f189e6316b876e09c9)
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ tags:
|
||||||
We cannot yet mount or interact with the partitions we have created. This is
|
We cannot yet mount or interact with the partitions we have created. This is
|
||||||
because we have not added a filesystem to each partition.
|
because we have not added a filesystem to each partition.
|
||||||
|
|
||||||
> A filesytem is a form of [database](/Databases/Basic_database_concepts.md); it
|
> A filesytem is a form of [database](Basic_database_concepts.md); it
|
||||||
> supplies the structure to transform a simple block device into the
|
> supplies the structure to transform a simple block device into the
|
||||||
> sophisticated hierarchy of files and subdirectories that users can understand.
|
> sophisticated hierarchy of files and subdirectories that users can understand.
|
||||||
|
|
||||||
|
|
@ -89,7 +89,7 @@ UUID=c53577b5-92ef-4a0a-9a19-e488bfdfa39c /home ext4 rw,relatime 0 2
|
||||||
```
|
```
|
||||||
|
|
||||||
It shows my root and home filesystems and my
|
It shows my root and home filesystems and my
|
||||||
[swap](/Operating_Systems/Disks/Swap_space.md) file. Note that we use the UUID
|
[swap](Swap_space.md) file. Note that we use the UUID
|
||||||
to name the partition rather than its name in `/dev/`. The order of the
|
to name the partition rather than its name in `/dev/`. The order of the
|
||||||
parameters is as follows:
|
parameters is as follows:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ tags: [logic-gates, binary, memory, clock]
|
||||||
# Flip-Flops
|
# Flip-Flops
|
||||||
|
|
||||||
A flip-flop is a type of
|
A flip-flop is a type of
|
||||||
[latch](/Electronics_and_Hardware/Digital_circuits/Latches.md) that is connected
|
[latch](Latches.md) that is connected
|
||||||
to a [clock signal](/Electronics_and_Hardware/Digital_circuits/Clock_signals.md)
|
to a [clock signal](Clock_signals.md)
|
||||||
and which executes in time with the clock's pulse. (Sometimes "latch" and
|
and which executes in time with the clock's pulse. (Sometimes "latch" and
|
||||||
"flip-flop" are used interchangeably but technically a latch is flip-flop
|
"flip-flop" are used interchangeably but technically a latch is flip-flop
|
||||||
without a clock connection.)
|
without a clock connection.)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags: [SQL, relational-databases]
|
||||||
# Creating views with foreign keys
|
# Creating views with foreign keys
|
||||||
|
|
||||||
We utilise **foreign** and
|
We utilise **foreign** and
|
||||||
[primary keys](/Databases/Relational_Databases/Primary_key.md) to create
|
[primary keys](Primary_key.md) to create
|
||||||
relationships between tables in SQL. Foreign keys link data in one table to the
|
relationships between tables in SQL. Foreign keys link data in one table to the
|
||||||
data in another table and are how we cross-reference data in SQL.
|
data in another table and are how we cross-reference data in SQL.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ only its result.
|
||||||
## Derivation rules
|
## Derivation rules
|
||||||
|
|
||||||
Derivation rules are
|
Derivation rules are
|
||||||
[syntactic](/Logic/Propositional_logic/Syntax_of_sentential_logic.md) rather
|
[syntactic](Syntax_of_sentential_logic.md) rather
|
||||||
than semantic. They are applied on the basis of their form rather than on the
|
than semantic. They are applied on the basis of their form rather than on the
|
||||||
basis of the truth conditions of the sentences they are applied to.
|
basis of the truth conditions of the sentences they are applied to.
|
||||||
|
|
||||||
|
|
@ -86,13 +86,13 @@ connective and one for its elimination.
|
||||||
|
|
||||||
The main derivation rules:
|
The main derivation rules:
|
||||||
|
|
||||||
- [Negation Introduction](/Logic/Proofs/Negation_Introduction.md)
|
- [Negation Introduction](Negation_Introduction.md)
|
||||||
- [Negation Elimination](/Logic/Proofs/Negation_Elimination.md)
|
- [Negation Elimination](Negation_Elimination.md)
|
||||||
- [Conjunction Introduction](/Logic/Proofs/Conjunction_Introduction.md)
|
- [Conjunction Introduction](Conjunction_Introduction.md)
|
||||||
- [Conjunction Elimination](/Logic/Proofs/Conditional_Elimination.md)
|
- [Conjunction Elimination](Conditional_Elimination.md)
|
||||||
- [Disjunction Introduction](/Logic/Proofs/Disjunction_Introduction.md)
|
- [Disjunction Introduction](Disjunction_Introduction.md)
|
||||||
- [Disjunction Elimination](/Logic/Proofs/Disjunction_Elimination.md)
|
- [Disjunction Elimination](Disjunction_Elimination.md)
|
||||||
- [Conditional Introduction](/Logic/Proofs/Conditional_Introduction.md)
|
- [Conditional Introduction](Conditional_Introduction.md)
|
||||||
- [Disjunction Elimination](/Logic/Proofs/Disjunction_Elimination.md)
|
- [Disjunction Elimination](Disjunction_Elimination.md)
|
||||||
- [Biconditional Introduction](/Logic/Proofs/Biconditional_Introduction.md)
|
- [Biconditional Introduction](Biconditional_Introduction.md)
|
||||||
- [Biconditional Elimination](/Logic/Proofs/Biconditional_Elimination.md)
|
- [Biconditional Elimination](Biconditional_Elimination.md)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ tags:
|
||||||
# Forms using hooks
|
# Forms using hooks
|
||||||
|
|
||||||
With hooks, form processing is exactly the same as
|
With hooks, form processing is exactly the same as
|
||||||
[classes](/Programming_Languages/React/Classes/Forms.md) in terms of the overall
|
[classes](Forms.md) in terms of the overall
|
||||||
methodology, but the syntax is slightly different as a result of the `useState`
|
methodology, but the syntax is slightly different as a result of the `useState`
|
||||||
hook.
|
hook.
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ export default FormHookAbstracted;
|
||||||
|
|
||||||
Note that instead of individual variables `email` , `phone`, `age` , this
|
Note that instead of individual variables `email` , `phone`, `age` , this
|
||||||
approach returns a single object `formValues` . We could therefore access the
|
approach returns a single object `formValues` . We could therefore access the
|
||||||
individual values with e.g `[formValues.email](http://formvalues.email)` .
|
individual values with e.g `[formValues.email](formvalues.email)` .
|
||||||
|
|
||||||
As it is an object, it makes resetting to the original state very easy, viz:
|
As it is an object, it makes resetting to the original state very easy, viz:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ tags: [logic-gates, binary]
|
||||||
# Four-bit adder
|
# Four-bit adder
|
||||||
|
|
||||||
A single
|
A single
|
||||||
[half adder](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md#half-adder)
|
[half adder](Half_adder_and_full_adder.md#half-adder)
|
||||||
and
|
and
|
||||||
[full adder](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md#fufll-adder)
|
[full adder](Half_adder_and_full_adder.md#fufll-adder)
|
||||||
allows us to calculate the sum of two 1-bit numbers, but this is not much use in
|
allows us to calculate the sum of two 1-bit numbers, but this is not much use in
|
||||||
practice. To approximate what is really happening at the circuit level in
|
practice. To approximate what is really happening at the circuit level in
|
||||||
computers we need to be able to add bigger binary numbers. We will demonstrate
|
computers we need to be able to add bigger binary numbers. We will demonstrate
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ echo $expandedRange
|
||||||
|
|
||||||
We can access all the arguments passed to a function using the `$@` syntax we
|
We can access all the arguments passed to a function using the `$@` syntax we
|
||||||
encountered before when
|
encountered before when
|
||||||
[passing arguments to scripts](/Programming_Languages/Shell/Passing_arguments_to_Bash_scripts.md).
|
[passing arguments to scripts](Passing_arguments_to_Bash_scripts.md).
|
||||||
(Here a function is a kind of script in miniature so the process is the same.)
|
(Here a function is a kind of script in miniature so the process is the same.)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ tags: [logic-gates, binary]
|
||||||
The half adder and full adder are components of digital circuits that enable us
|
The half adder and full adder are components of digital circuits that enable us
|
||||||
to carry out binary addition. Using adders and half adders we can add two binary
|
to carry out binary addition. Using adders and half adders we can add two binary
|
||||||
numbers together. Adders are a type of [integrated circuit]() comprising certain
|
numbers together. Adders are a type of [integrated circuit]() comprising certain
|
||||||
[logic gates](/Hardware/Digital_circuits/Logic_gates.md) where the arrangement
|
[logic gates](Logic_gates.md) where the arrangement
|
||||||
allows for the representation of the addition of bits.
|
allows for the representation of the addition of bits.
|
||||||
|
|
||||||
### Example addition
|
### Example addition
|
||||||
|
|
@ -90,7 +90,7 @@ We can represent this with a simple truth-table:
|
||||||
| 1 | 1 | 0 | 1 |
|
| 1 | 1 | 0 | 1 |
|
||||||
|
|
||||||
We can see that the sum bit column replicates the truth-conditions of
|
We can see that the sum bit column replicates the truth-conditions of
|
||||||
[XOR](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#xor-gate):
|
[XOR](Logic_gates.md#xor-gate):
|
||||||
|
|
||||||
| P | Q | P V Q |
|
| P | Q | P V Q |
|
||||||
| --- | --- | ----- |
|
| --- | --- | ----- |
|
||||||
|
|
@ -100,7 +100,7 @@ We can see that the sum bit column replicates the truth-conditions of
|
||||||
| F | F | F |
|
| F | F | F |
|
||||||
|
|
||||||
And the carry-out bit replicates the truth conditions of
|
And the carry-out bit replicates the truth conditions of
|
||||||
[AND](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#and-gate):
|
[AND](Logic_gates.md#and-gate):
|
||||||
|
|
||||||
| P | Q | P & Q |
|
| P | Q | P & Q |
|
||||||
| --- | --- | ----- |
|
| --- | --- | ----- |
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ tags: [nand-to-tetris]
|
||||||
|
|
||||||
An HDL is a declarative programming language used to describe the behaviour or
|
An HDL is a declarative programming language used to describe the behaviour or
|
||||||
structure of
|
structure of
|
||||||
[digital circuits](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md).
|
[digital circuits](Integrated_circuits.md).
|
||||||
They are used to simulate the circuit and check its response.
|
They are used to simulate the circuit and check its response.
|
||||||
|
|
||||||
The hardware designer specifies a chip's logic by writing an HDL program which
|
The hardware designer specifies a chip's logic by writing an HDL program which
|
||||||
is then rigorously tested. At this stage, a
|
is then rigorously tested. At this stage, a
|
||||||
[hardware simulator](/Computer_Architecture/Hardware_simulation.md) takes the
|
[hardware simulator](Hardware_simulation.md) takes the
|
||||||
HDL program as input and creates a software representation of the chip logic.
|
HDL program as input and creates a software representation of the chip logic.
|
||||||
The designer can instruct the simulator to test the virtual chip on various sets
|
The designer can instruct the simulator to test the virtual chip on various sets
|
||||||
of inputs. This is done to check the chip's functionality but also to benchmark
|
of inputs. This is done to check the chip's functionality but also to benchmark
|
||||||
|
|
@ -76,7 +76,7 @@ circuit diagram
|
||||||
#### Pins
|
#### Pins
|
||||||
|
|
||||||
In an HDL program we distinguish internal pins along with the standard
|
In an HDL program we distinguish internal pins along with the standard
|
||||||
[input and output pins](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md).
|
[input and output pins](Integrated_circuits.md).
|
||||||
At the level of the interface, we are concerned only with input and output pins
|
At the level of the interface, we are concerned only with input and output pins
|
||||||
(in the example program these are `a`, `b` and `out`). It is at the level of the
|
(in the example program these are `a`, `b` and `out`). It is at the level of the
|
||||||
implementation that internal pins are encountered. In the example these are the
|
implementation that internal pins are encountered. In the example these are the
|
||||||
|
|
@ -91,7 +91,7 @@ a NOT. `out` is the value that is computed based on the input pins of `a` and
|
||||||
Along with the HDL file we also create a test file. This runs the chip against
|
Along with the HDL file we also create a test file. This runs the chip against
|
||||||
the inputs we supply, these will typically be equivalent to the (left-hand)
|
the inputs we supply, these will typically be equivalent to the (left-hand)
|
||||||
truth-values column in a truth table which is the same as the parameters passed
|
truth-values column in a truth table which is the same as the parameters passed
|
||||||
to a [Boolean function](/Logic/Propositional_logic/Boolean_functions.md), for
|
to a [Boolean function](Boolean_functions.md), for
|
||||||
example:
|
example:
|
||||||
|
|
||||||
```vhdl
|
```vhdl
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags: [nand-to-tetris]
|
||||||
# Hardware simulation
|
# Hardware simulation
|
||||||
|
|
||||||
In order to test our
|
In order to test our
|
||||||
[HDL](/Computer_Architecture/Hardware_Description_Language.md) files we load
|
[HDL](Hardware_Description_Language.md) files we load
|
||||||
them into the hardware simulator program. We will demonstrate this with the
|
them into the hardware simulator program. We will demonstrate this with the
|
||||||
following XOR implementation:
|
following XOR implementation:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ tags: [number-systems]
|
||||||
|
|
||||||
Hexadecimal is the other main number system used in computing. It works in
|
Hexadecimal is the other main number system used in computing. It works in
|
||||||
tandem with the
|
tandem with the
|
||||||
[binary number system](/Electronics_and_Hardware/Binary/Binary_number_system.md)
|
[binary number system](Binary_number_system.md)
|
||||||
and provides an easier and more accessible means of working with long sequences
|
and provides an easier and more accessible means of working with long sequences
|
||||||
of binary numbers.
|
of binary numbers.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,9 +133,9 @@ file.close()
|
||||||
|
|
||||||
Obviously file access can raise errors - typically when the file you want to
|
Obviously file access can raise errors - typically when the file you want to
|
||||||
access does not exist (i.e. a `FileNotFoundError`
|
access does not exist (i.e. a `FileNotFoundError`
|
||||||
[exception](/Programming_Languages/Python/Syntax/Error_handling_in_Python.md)).
|
[exception](Error_handling_in_Python.md)).
|
||||||
We can manage this scenario with
|
We can manage this scenario with
|
||||||
[exception handlers](/Programming_Languages/Python/Syntax/Error_handling_in_Python.md):
|
[exception handlers](Error_handling_in_Python.md):
|
||||||
|
|
||||||
```py
|
```py
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ tags: [CPU]
|
||||||
|
|
||||||
# instruction set architectures
|
# instruction set architectures
|
||||||
|
|
||||||
We know that the [ALU](/Computer_Architecture/CPU/Arithmetic_Logic_Unit.md) is
|
We know that the [ALU](Arithmetic_Logic_Unit.md) is
|
||||||
responsible for the "execute" stage of the
|
responsible for the "execute" stage of the
|
||||||
[fetch, decode, execute](/Computer_Architecture/CPU/Fetch_decode_execute.md)
|
[fetch, decode, execute](Fetch_decode_execute.md)
|
||||||
cycle, implementing the most basic binary operations such as adding two numbers.
|
cycle, implementing the most basic binary operations such as adding two numbers.
|
||||||
|
|
||||||
Accross different machines and CPU types there can be differences in how the
|
Accross different machines and CPU types there can be differences in how the
|
||||||
|
|
@ -39,7 +39,7 @@ Over time, new instructions have been added to the x86 architecture but they all
|
||||||
maintain backwards compatibility with preceding generations.
|
maintain backwards compatibility with preceding generations.
|
||||||
|
|
||||||
There have been different, successive generations of x86 corresponding to their
|
There have been different, successive generations of x86 corresponding to their
|
||||||
[word-size](/Electronics_and_Hardware/Binary/Signed_and_unsigned_numbers.md):
|
[word-size](Signed_and_unsigned_numbers.md):
|
||||||
16-bit, 32-bit, 64-bit. Word size here just means how many bits the processor
|
16-bit, 32-bit, 64-bit. Word size here just means how many bits the processor
|
||||||
can work with at a time.
|
can work with at a time.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ tags: [logic-gates]
|
||||||
|
|
||||||
An integrated circuit (IC) is a single unit that comprises several logic gates
|
An integrated circuit (IC) is a single unit that comprises several logic gates
|
||||||
designed for the easy construction of
|
designed for the easy construction of
|
||||||
[digital circuits](/Electronics_and_Hardware/Digital_circuits/Digital_circuits.md).
|
[digital circuits](Digital_circuits.md).
|
||||||
The terms "integrated circuit" and "chip" are often used interchangeably.
|
The terms "integrated circuit" and "chip" are often used interchangeably.
|
||||||
|
|
||||||
An IC puts the gates on a single piece of silicon that has electrical contact
|
An IC puts the gates on a single piece of silicon that has electrical contact
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ them as JSON.
|
||||||
Although Mongo is not a relational database it has a structure that we can
|
Although Mongo is not a relational database it has a structure that we can
|
||||||
understand in relation to that paradigm. A **database** is obviously the overall
|
understand in relation to that paradigm. A **database** is obviously the overall
|
||||||
structure. It comprises **collections** which are organised sets of data that
|
structure. It comprises **collections** which are organised sets of data that
|
||||||
are analagous to [tables](/Databases/Relational_database_architecture.md#table)
|
are analagous to [tables](Relational_database_architecture.md#table)
|
||||||
in RDBs. Within each collection are a series of **documents** which we can think
|
in RDBs. Within each collection are a series of **documents** which we can think
|
||||||
of as being equivalent to [rows](/Databases/Relational_database_architecture.md)
|
of as being equivalent to [rows](Relational_database_architecture.md)
|
||||||
in RDB table: units that comprise the collection.
|
in RDB table: units that comprise the collection.
|
||||||
|
|
||||||
A document is a container comprising key-value pairs in the manner of an object.
|
A document is a container comprising key-value pairs in the manner of an object.
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,9 @@ In Python there are two common ways to handle similar data structures:
|
||||||
### Sorting by common property
|
### Sorting by common property
|
||||||
|
|
||||||
Assuming the sub-lists have an identical structure, you can
|
Assuming the sub-lists have an identical structure, you can
|
||||||
[sort](/Programming_Languages/Python/Syntax/Sorting_lists_in_Python.md) them by
|
[sort](Sorting_lists_in_Python.md) them by
|
||||||
a common property by passing a
|
a common property by passing a
|
||||||
[lambda function](/Programming_Languages/Python/Syntax/Lambdas_in_Python.md) to
|
[lambda function](Lambdas_in_Python.md) to
|
||||||
the `key` value of `sorted()` and `.sort()`.
|
the `key` value of `sorted()` and `.sort()`.
|
||||||
|
|
||||||
For example, to sort the following list of lists by the second `age` property:
|
For example, to sort the following list of lists by the second `age` property:
|
||||||
|
|
@ -108,8 +108,8 @@ data = [
|
||||||
```
|
```
|
||||||
|
|
||||||
Below we use
|
Below we use
|
||||||
[map](/Programming_Languages/Python/Syntax/Map_and_filter_in_Python.md) and a
|
[map](Map_and_filter_in_Python.md) and a
|
||||||
[lambda function](/Programming_Languages/Python/Syntax/Lambdas_in_Python.md) to
|
[lambda function](Lambdas_in_Python.md) to
|
||||||
convert the first element of each iner list from a Unix timestamp to a readable
|
convert the first element of each iner list from a Unix timestamp to a readable
|
||||||
string:
|
string:
|
||||||
|
|
||||||
|
|
@ -118,7 +118,7 @@ string:
|
||||||
```
|
```
|
||||||
|
|
||||||
We could also use
|
We could also use
|
||||||
[list comprehension](/Programming_Languages/Python/Syntax/List_comprehension_etc.md)
|
[list comprehension](List_comprehension_etc.md)
|
||||||
to achieve the same outcome:
|
to achieve the same outcome:
|
||||||
|
|
||||||
```py
|
```py
|
||||||
|
|
@ -195,7 +195,7 @@ will simply overwrite the old value for that key.
|
||||||
|
|
||||||
Accordingly, we create a dictionary which uses the unique key in each list as
|
Accordingly, we create a dictionary which uses the unique key in each list as
|
||||||
the key of each dictionary entry via
|
the key of each dictionary entry via
|
||||||
[dictionary comprehension](/Programming_Languages/Python/Syntax/List_comprehension_etc.md#dictionary-comprehension)
|
[dictionary comprehension](List_comprehension_etc.md#dictionary-comprehension)
|
||||||
that loops through each value in the inner lists of the multidimensional array.
|
that loops through each value in the inner lists of the multidimensional array.
|
||||||
We then parse the values of the dictionary into a list.
|
We then parse the values of the dictionary into a list.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ that share the same fields**.
|
||||||
The output will be represented as a table but it is virtual, not an actual
|
The output will be represented as a table but it is virtual, not an actual
|
||||||
table. (If you wish to actually create a table or a view off the back of a join
|
table. (If you wish to actually create a table or a view off the back of a join
|
||||||
operation you should combine the join with the
|
operation you should combine the join with the
|
||||||
[`CREATE TABLE`](/Databases/SQL/Create_an_SQL_table.md) command etc.)
|
[`CREATE TABLE`](Create_an_SQL_table.md) command etc.)
|
||||||
|
|
||||||
## Inner joins
|
## Inner joins
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ tags: [graphql, APIs]
|
||||||
> The best way to think of GraphQL architecturally is to think of it as a
|
> The best way to think of GraphQL architecturally is to think of it as a
|
||||||
> different technique for instantiating the _uniform interface_, _client/server
|
> different technique for instantiating the _uniform interface_, _client/server
|
||||||
> decoupling_, and _layered-system architecture_ contraints of traditional
|
> decoupling_, and _layered-system architecture_ contraints of traditional
|
||||||
> [REST APIs](/Databases/REST/RESTful_APIs.md#rest). However, instead of making
|
> [REST APIs](RESTful_APIs.md#rest). However, instead of making
|
||||||
> GET or POST requests to a REST endpoint URL and passing parameters, you send a
|
> GET or POST requests to a REST endpoint URL and passing parameters, you send a
|
||||||
> structured query object.
|
> structured query object.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,6 @@ generic diode circuit symbol:
|
||||||
|
|
||||||
An LED diode lights up when the right amount of current flows through it. A
|
An LED diode lights up when the right amount of current flows through it. A
|
||||||
standard LED has a maximum current of 20mA. An appropriate
|
standard LED has a maximum current of 20mA. An appropriate
|
||||||
[resistor](/Electronics_and_Hardware/Analogue_circuits/Resistance.md#resistors)
|
[resistor](Resistance.md#resistors)
|
||||||
must therefore be added to the circuit to ensure the current doesn't exeedd this
|
must therefore be added to the circuit to ensure the current doesn't exeedd this
|
||||||
amount.
|
amount.
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,12 @@ The overall architecure consists in the following three processes:
|
||||||
|
|
||||||
## Triggers
|
## Triggers
|
||||||
|
|
||||||
See [AWS Lambda triggers](/DevOps/AWS/AWS_Lambda/Lambda_triggers.md)
|
See [AWS Lambda triggers](Lambda_triggers.md)
|
||||||
|
|
||||||
## Handler function
|
## Handler function
|
||||||
|
|
||||||
See
|
See
|
||||||
[AWS Lambda handler function](/DevOps/AWS/AWS_Lambda/Lambda_handler_function.md)
|
[AWS Lambda handler function](Lambda_handler_function.md)
|
||||||
|
|
||||||
## Code
|
## Code
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,6 @@ Here are some common trigger patterns
|
||||||
|
|
||||||
### SQS trigger
|
### SQS trigger
|
||||||
|
|
||||||
- a new message is added to an [SQS](/DevOps/AWS/AWS_Messaging_services.md#sqs)
|
- a new message is added to an [SQS](AWS_Messaging_services.md#sqs)
|
||||||
queue
|
queue
|
||||||
- SQS triggers a Lambda function to execute
|
- SQS triggers a Lambda function to execute
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ Whilst they are unnamed, just like JS, the value they return can be stored in a
|
||||||
variable. They do not require the `return` keyword.
|
variable. They do not require the `return` keyword.
|
||||||
|
|
||||||
They are most often used unnamed with the functional methods
|
They are most often used unnamed with the functional methods
|
||||||
[map, filter](/Programming_Languages/Python/Syntax/Map_and_filter_in_Python.md)
|
[map, filter](Map_and_filter_in_Python.md)
|
||||||
and reduce.
|
and reduce.
|
||||||
|
|
||||||
Here is the two syntaxes side by side:
|
Here is the two syntaxes side by side:
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ tags: [logic-gates, binary, memory]
|
||||||
The **combinatorial digital circuits** we have looked at so far have been
|
The **combinatorial digital circuits** we have looked at so far have been
|
||||||
non-sequential. The outcome is a function of its immediate set of inputs and
|
non-sequential. The outcome is a function of its immediate set of inputs and
|
||||||
everything happens at once: there is no means of storing state for future use.
|
everything happens at once: there is no means of storing state for future use.
|
||||||
In other words there is no _[memory](/Computer_Architecture/Memory/Memory.md)_.
|
In other words there is no _[memory](Memory.md)_.
|
||||||
|
|
||||||
In contrast, the output of a **sequential digital circuit** depends not only on
|
In contrast, the output of a **sequential digital circuit** depends not only on
|
||||||
its present set of inputs but also on past inputs to the circuit. It has some
|
its present set of inputs but also on past inputs to the circuit. It has some
|
||||||
|
|
@ -54,7 +54,7 @@ _The representation of an SR Latch in a digital circuit diagram_:
|
||||||
The circuit diagram latch symbol obviously encapsulates more complex
|
The circuit diagram latch symbol obviously encapsulates more complex
|
||||||
functionality that occurs at the sub-circuit level. We will demonstrate how this
|
functionality that occurs at the sub-circuit level. We will demonstrate how this
|
||||||
functionality can be achieved with two
|
functionality can be achieved with two
|
||||||
[NOR](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#nor-gate) gates.
|
[NOR](Logic_gates.md#nor-gate) gates.
|
||||||
|
|
||||||
The two gates are in a **cross-coupled configuration**. This basically means
|
The two gates are in a **cross-coupled configuration**. This basically means
|
||||||
that the wires are crossed back on themselves such that the output of one is
|
that the wires are crossed back on themselves such that the output of one is
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ The final phase is unmounting: when the component is removed from the DOM:
|
||||||
|
|
||||||
6. `componentWillUnmount()`
|
6. `componentWillUnmount()`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Side-effects: why lifecycle phases matter
|
## Side-effects: why lifecycle phases matter
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ element in a list without explicitly using loop syntax.
|
||||||
|
|
||||||
Since its introduction to the language, the same functionality has become
|
Since its introduction to the language, the same functionality has become
|
||||||
achievable by using functional methods like
|
achievable by using functional methods like
|
||||||
[`map` and `filter`](/Programming_Languages/Python/Syntax/Map_and_filter_in_Python.md),
|
[`map` and `filter`](Map_and_filter_in_Python.md),
|
||||||
utilising [lambdas](/Programming_Languages/Python/Syntax/Lambdas_in_Python.md)
|
utilising [lambdas](Lambdas_in_Python.md)
|
||||||
however list comprehension is often more straightforward and easier to read.
|
however list comprehension is often more straightforward and easier to read.
|
||||||
|
|
||||||
## Syntax
|
## Syntax
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ fi
|
||||||
```
|
```
|
||||||
|
|
||||||
Here we pass all the elements of the array to a
|
Here we pass all the elements of the array to a
|
||||||
[test](/Programming_Languages/Shell/Test_values_in_Bash.md) condition which
|
[test](Test_values_in_Bash.md) condition which
|
||||||
tests for an empty string.
|
tests for an empty string.
|
||||||
|
|
||||||
> NB: This will not immediately work in the context of a function. See below.
|
> NB: This will not immediately work in the context of a function. See below.
|
||||||
|
|
@ -96,7 +96,7 @@ tests for an empty string.
|
||||||
## Weirdness with functions
|
## Weirdness with functions
|
||||||
|
|
||||||
When you pass an array as an argument to a
|
When you pass an array as an argument to a
|
||||||
[function](/Programming_Languages/Shell/Functions_in_Bash.md) it will not
|
[function](Functions_in_Bash.md) it will not
|
||||||
immediately be understood to be an array.
|
immediately be understood to be an array.
|
||||||
|
|
||||||
When we use `$1` to individuate the first function argument this is read as
|
When we use `$1` to individuate the first function argument this is read as
|
||||||
|
|
@ -163,4 +163,4 @@ done
|
||||||
```
|
```
|
||||||
|
|
||||||
We are leveraging this aspect of Bash when we
|
We are leveraging this aspect of Bash when we
|
||||||
[loop through each character in a string](/Programming_Languages/Shell/Strings_in_bash.md#loop-through-each-character-in-a-string).
|
[loop through each character in a string](Strings_in_bash.md#loop-through-each-character-in-a-string).
|
||||||
|
|
|
||||||
|
|
@ -190,4 +190,4 @@ print(merged_list) # Output: [1, 2, 3, 4, 5, 6]
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
[Sorting lists in Python](/Programming_Languages/Python/Syntax/Sorting_lists_in_Python.md)
|
[Sorting lists in Python](Sorting_lists_in_Python.md)
|
||||||
|
|
|
||||||
|
|
@ -19,19 +19,19 @@ tags: [logic-gates, binary]
|
||||||
Logic gates are the basic building blocks of digital computing. **A logic gate
|
Logic gates are the basic building blocks of digital computing. **A logic gate
|
||||||
is an electrical circuit that has one or more than one input and only one
|
is an electrical circuit that has one or more than one input and only one
|
||||||
output.** The input and output points of the gate are
|
output.** The input and output points of the gate are
|
||||||
[pins](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md) The
|
[pins](Integrated_circuits.md) The
|
||||||
input controls the output and the logic determining which types of input
|
input controls the output and the logic determining which types of input
|
||||||
(on/off) lead to specific outputs (on/off) is isomorphic with the
|
(on/off) lead to specific outputs (on/off) is isomorphic with the
|
||||||
truth-conditions of the
|
truth-conditions of the
|
||||||
[Boolean connectives](/Logic/Truth-functional_connectives.md) specifiable in
|
[Boolean connectives](Truth-functional_connectives.md) specifiable in
|
||||||
terms of [truth tables](/Logic/Truth-tables.md).
|
terms of [truth tables](Truth-tables.md).
|
||||||
|
|
||||||
Physically, what 'travels through' the gates is electrical current and what
|
Physically, what 'travels through' the gates is electrical current and what
|
||||||
constitutes the 'gate' is a
|
constitutes the 'gate' is a
|
||||||
[transistor](/Electronics_and_Hardware/Digital_circuits/Transistors.md)
|
[transistor](Transistors.md)
|
||||||
responding to the current. Going up a level of abstraction, the current/ charge
|
responding to the current. Going up a level of abstraction, the current/ charge
|
||||||
is identified with a
|
is identified with a
|
||||||
[bit](/Electronics_and_Hardware/Binary/Binary_units_of_measurement.md#binary-units-of-measurement).
|
[bit](Binary_units_of_measurement.md#binary-units-of-measurement).
|
||||||
It is bits that go into the gate and bits which come out: binary information
|
It is bits that go into the gate and bits which come out: binary information
|
||||||
that may be either 1 or 0.
|
that may be either 1 or 0.
|
||||||
|
|
||||||
|
|
@ -45,10 +45,10 @@ one elemen>tary gate and/or other composite gates.
|
||||||
An example of a composite gate would be a three-way AND. An AND with three
|
An example of a composite gate would be a three-way AND. An AND with three
|
||||||
inputs rather than the standard two that furnish the elementary AND gate. This
|
inputs rather than the standard two that furnish the elementary AND gate. This
|
||||||
gate would output 1 when all three gates have the value 1 and 0 otherwise.
|
gate would output 1 when all three gates have the value 1 and 0 otherwise.
|
||||||
[Adders](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md)
|
[Adders](Half_adder_and_full_adder.md)
|
||||||
and [latche>s](/Electronics_and_Hardware/Digital_circuits/Latches.md) whilst
|
and [latche>s](Latches.md) whilst
|
||||||
being
|
being
|
||||||
[integrated circuits](/Electronics_and_Hardware/Digital_circuits/Integrated_circuits.md)
|
[integrated circuits](Integrated_circuits.md)
|
||||||
are also, technically speaking, composite gates.
|
are also, technically speaking, composite gates.
|
||||||
|
|
||||||
## Gate interface / gate implementation
|
## Gate interface / gate implementation
|
||||||
|
|
@ -73,7 +73,7 @@ represented in the interface diagram.
|
||||||
> is a one-to-many relationship at work here. From the point of view of the user
|
> is a one-to-many relationship at work here. From the point of view of the user
|
||||||
> interface these differences should not be detectable. This is another example
|
> interface these differences should not be detectable. This is another example
|
||||||
> of
|
> of
|
||||||
> [hardware abstraction](/Computer_Architecture/Hardware_abstraction_and_modularity.md)
|
> [hardware abstraction](Hardware_abstraction_and_modularity.md)
|
||||||
|
|
||||||
## NOT gate
|
## NOT gate
|
||||||
|
|
||||||
|
|
@ -138,7 +138,7 @@ NANDs alone.
|
||||||
## OR gate
|
## OR gate
|
||||||
|
|
||||||
> The OR gate represents the truth conditions of the
|
> The OR gate represents the truth conditions of the
|
||||||
> [disjunction](/Logic/Truth-functional_connectives### Truth
|
> [disjunction](Truth-functional_connectives### Truth
|
||||||
> conditions.md#disjunction) truth functional connective
|
> conditions.md#disjunction) truth functional connective
|
||||||
|
|
||||||
### Symbol
|
### Symbol
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ In other terms, if you can derive a contradiction from the set, the set is
|
||||||
logically inconsistent.
|
logically inconsistent.
|
||||||
|
|
||||||
A
|
A
|
||||||
[contradiction](/Logic/General_concepts/Logical_truth_and_falsity.md#logical-falsity)
|
[contradiction](Logical_truth_and_falsity.md#logical-falsity)
|
||||||
has very important consequences for reasoning because if a set of propositions
|
has very important consequences for reasoning because if a set of propositions
|
||||||
is inconsistent, any other proposition is derivable from it.
|
is inconsistent, any other proposition is derivable from it.
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ sequence of reasoning._
|
||||||
|
|
||||||
Here we want to derive some proposition $Q$. If we can derive a contradiction
|
Here we want to derive some proposition $Q$. If we can derive a contradiction
|
||||||
from its negation as an assumption then, by the
|
from its negation as an assumption then, by the
|
||||||
[negation elimination](/Logic/Proofs/Negation_Elimination.md)) rule, we can
|
[negation elimination](Negation_Elimination.md)) rule, we can
|
||||||
assert $Q$. This is why contradictions should be avoided in arguments, they
|
assert $Q$. This is why contradictions should be avoided in arguments, they
|
||||||
'prove' everything which, by association, undermines any particular premise you
|
'prove' everything which, by association, undermines any particular premise you
|
||||||
are trying to assert.
|
are trying to assert.
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,6 @@ $$
|
||||||
|
|
||||||
Note that the property of equivalence stated in terms of derivablity above is
|
Note that the property of equivalence stated in terms of derivablity above is
|
||||||
identical to the derivation rule for the
|
identical to the derivation rule for the
|
||||||
[material biconditional](/Logic/Proofs/Biconditional_Introduction.md):
|
[material biconditional](Biconditional_Introduction.md):
|
||||||
|
|
||||||

|

|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ tags: [propositional-logic]
|
||||||
|
|
||||||
The vast majority of propositions in natural and formal logical languages are
|
The vast majority of propositions in natural and formal logical languages are
|
||||||
**neither
|
**neither
|
||||||
[logically true](/Logic/General_concepts/Logical_truth_and_falsity.md#logical-truth)
|
[logically true](Logical_truth_and_falsity.md#logical-truth)
|
||||||
or
|
or
|
||||||
[logically false](/Logic/General_concepts/Logical_truth_and_falsity.md#logical-falsity)**.
|
[logically false](Logical_truth_and_falsity.md#logical-falsity)**.
|
||||||
This makes sense because propositions of this form are all either tautologies or
|
This makes sense because propositions of this form are all either tautologies or
|
||||||
contradictions and as such do not express information about the state of events
|
contradictions and as such do not express information about the state of events
|
||||||
in the world. We call propositions that are neither logically true or logically
|
in the world. We call propositions that are neither logically true or logically
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ tags: [propositional-logic]
|
||||||
## Logical possibility
|
## Logical possibility
|
||||||
|
|
||||||
In distinguishing the properties of
|
In distinguishing the properties of
|
||||||
[logical consistency](/Logic/General_concepts/Logical_consistency.md) and
|
[logical consistency](Logical_consistency.md) and
|
||||||
[validity](/Logic/General_concepts/Validity_and_entailment.md) we make tacit use
|
[validity](Validity_and_entailment.md) we make tacit use
|
||||||
of the notion of **possibility**. This is because when we consider the validity
|
of the notion of **possibility**. This is because when we consider the validity
|
||||||
of an argument we are assessing truth-conditions and this consists in asking
|
of an argument we are assessing truth-conditions and this consists in asking
|
||||||
ourselves what could or could not be the case: were it such that _P_, then it
|
ourselves what could or could not be the case: were it such that _P_, then it
|
||||||
|
|
@ -60,7 +60,7 @@ From this we can derive the following property of logical possibility:
|
||||||
A proposition is _logically necessary_ if it is true in every logically possible
|
A proposition is _logically necessary_ if it is true in every logically possible
|
||||||
circumstance which is to say: true on every possible truth functional
|
circumstance which is to say: true on every possible truth functional
|
||||||
assignment. Necessity and
|
assignment. Necessity and
|
||||||
[logical truth](/Logic/General_concepts/Logical_truth_and_falsity.md#logical-truth)
|
[logical truth](Logical_truth_and_falsity.md#logical-truth)
|
||||||
are therefore synonyms: anything that is logically true (a tautology) is true by
|
are therefore synonyms: anything that is logically true (a tautology) is true by
|
||||||
necessity (could not be otherwise.)
|
necessity (could not be otherwise.)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ Apples are fruits and apples are not fruits
|
||||||
|
|
||||||
Neither proposition can be true because the truth of the first clause is
|
Neither proposition can be true because the truth of the first clause is
|
||||||
contradicted by the second. By the principle of
|
contradicted by the second. By the principle of
|
||||||
[consistency](/Logic/General_concepts/Logical_consistency.md), it is not
|
[consistency](Logical_consistency.md), it is not
|
||||||
possible for both clauses to be true at once therefore the proposition, overall
|
possible for both clauses to be true at once therefore the proposition, overall
|
||||||
has the truth value of false.
|
has the truth value of false.
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ technicalities that have philosophically interesting consequences.
|
||||||
- If an argument contains premises which are logically false than this argument
|
- If an argument contains premises which are logically false than this argument
|
||||||
will perforce be valid. This is because one cannot consistently assert the
|
will perforce be valid. This is because one cannot consistently assert the
|
||||||
premises and deny the conclusion which is the definition of
|
premises and deny the conclusion which is the definition of
|
||||||
[validity](/Logic/General_concepts/Validity_and_entailment.md). However the
|
[validity](Validity_and_entailment.md). However the
|
||||||
_reason_ why one cannot consistently assert the premises and deny the
|
_reason_ why one cannot consistently assert the premises and deny the
|
||||||
conclusions is because one cannot consistently assert the premises - they
|
conclusions is because one cannot consistently assert the premises - they
|
||||||
conflict with each other. Furthermore as the argument contains false premises,
|
conflict with each other. Furthermore as the argument contains false premises,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ With a full-scale Node application you will typically run three environments:
|
||||||
|
|
||||||
To determine the current environment we can use the variable
|
To determine the current environment we can use the variable
|
||||||
**`process.env.NODE_ENV`** from the
|
**`process.env.NODE_ENV`** from the
|
||||||
[global process object](/Programming_Languages/Node/Architecture/Process_object.md).
|
[global process object](Process_object.md).
|
||||||
This works universally regardless of the kind of Node app we are building.
|
This works universally regardless of the kind of Node app we are building.
|
||||||
|
|
||||||
If you have not manually set up your environments, **`process.env.NODE_ENV`**
|
If you have not manually set up your environments, **`process.env.NODE_ENV`**
|
||||||
|
|
@ -29,7 +29,7 @@ will return `undefined`.
|
||||||
#### For the session
|
#### For the session
|
||||||
|
|
||||||
`NODE_ENV` is a bash
|
`NODE_ENV` is a bash
|
||||||
[environment variable](/Programming_Languages/Shell_Scripting/Environmental_and_shell_variables.md)
|
[environment variable](Environmental_and_shell_variables.md)
|
||||||
like any other. So we can set it in the normal way:
|
like any other. So we can set it in the normal way:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -45,7 +45,7 @@ In Express, there is a built in method for retrieving the current envrionment:
|
||||||
|
|
||||||
## Configuring environments
|
## Configuring environments
|
||||||
|
|
||||||
We use the third-party [Config](https://github.com/node-config/node-config)
|
We use the third-party [Config](node-config)
|
||||||
package to manage different configurations based on the environment.
|
package to manage different configurations based on the environment.
|
||||||
|
|
||||||
Once installed we set up a dedicated config directory with a structure as
|
Once installed we set up a dedicated config directory with a structure as
|
||||||
|
|
@ -85,7 +85,7 @@ for our application. We obviously shouldn't store this data openly in our config
|
||||||
files since it would be made public.
|
files since it would be made public.
|
||||||
|
|
||||||
We can do so securely by utilising
|
We can do so securely by utilising
|
||||||
[environmental variables](../Shell_Scripting/Environmental_and_shell_variables.md)
|
[environmental variables](Environmental_and_shell_variables.md)
|
||||||
alongside the config pacakage.
|
alongside the config pacakage.
|
||||||
|
|
||||||
We create a file called `custom-environment-variables` (must be called this) and
|
We create a file called `custom-environment-variables` (must be called this) and
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ const handleSubmit = useCallback(
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the syntax is similar to [useEffect](./useEffect.md): there is a
|
Note that the syntax is similar to [useEffect](useEffect.md): there is a
|
||||||
dependency array. The effect is the same: the function contained within
|
dependency array. The effect is the same: the function contained within
|
||||||
`useCallback` will only re-rendered if one of these dependencies changes.
|
`useCallback` will only re-rendered if one of these dependencies changes.
|
||||||
However (see next section) the function will run in its memoized form on every
|
However (see next section) the function will run in its memoized form on every
|
||||||
|
|
|
||||||
22
zk/Memory.md
|
|
@ -12,7 +12,7 @@ tags: [memory, motherboard]
|
||||||
> A CPU is just an operator on memory. It reads its instructions and data from
|
> A CPU is just an operator on memory. It reads its instructions and data from
|
||||||
> the memory and writes back out to the memory. (Ward 2021)
|
> the memory and writes back out to the memory. (Ward 2021)
|
||||||
|
|
||||||
When a [CPU](/Computer_Architecture/CPU/CPU_architecture.md) executes a program,
|
When a [CPU](CPU_architecture.md) executes a program,
|
||||||
it needs a place to store the program's **instructions** and **related data**.
|
it needs a place to store the program's **instructions** and **related data**.
|
||||||
This is the role of memory.
|
This is the role of memory.
|
||||||
|
|
||||||
|
|
@ -43,11 +43,11 @@ DRAM uses capacitors to create the memory cell:
|
||||||
In a DRAM cell, each bit of data is stored as a charge in a capacitor. The
|
In a DRAM cell, each bit of data is stored as a charge in a capacitor. The
|
||||||
presence of charge represents a '1' bit and the absence of charge represents a
|
presence of charge represents a '1' bit and the absence of charge represents a
|
||||||
'0' bit. Each of these cells is paired with a
|
'0' bit. Each of these cells is paired with a
|
||||||
[transistor](/Electronics_and_Hardware/Digital_circuits/Transistors.md) that
|
[transistor](Transistors.md) that
|
||||||
controls the reading and writing of data.
|
controls the reading and writing of data.
|
||||||
|
|
||||||
However capacitors lose
|
However capacitors lose
|
||||||
[charge](/Electronics_and_Hardware/Analogue_circuits/Current.md) over time due
|
[charge](Current.md) over time due
|
||||||
to leaks. As a result DRAM is memory that needs to be refreshed (recharged)
|
to leaks. As a result DRAM is memory that needs to be refreshed (recharged)
|
||||||
frequently. For this reason and because it only uses one transistor and
|
frequently. For this reason and because it only uses one transistor and
|
||||||
capacitor per bit, DRAM is the less expensive form of volatile memory.
|
capacitor per bit, DRAM is the less expensive form of volatile memory.
|
||||||
|
|
@ -59,7 +59,7 @@ implementation is different. Unlike DRAM it doesn't use capacitors. Consequently
|
||||||
the transistors do not leak or need to be refreshed, hence why SRAM is _static_
|
the transistors do not leak or need to be refreshed, hence why SRAM is _static_
|
||||||
and DRAM is _dynamic_.
|
and DRAM is _dynamic_.
|
||||||
|
|
||||||
SRAM uses [flip flops](/Electronics_and_Hardware/Digital_circuits/Flip_flops.md)
|
SRAM uses [flip flops](Flip_flops.md)
|
||||||
to store the bits. It also uses multiple transistors per bit. This makes it
|
to store the bits. It also uses multiple transistors per bit. This makes it
|
||||||
faster than DRAM but more expensive. DRAM is at least ten times slower than
|
faster than DRAM but more expensive. DRAM is at least ten times slower than
|
||||||
SRAM.
|
SRAM.
|
||||||
|
|
@ -68,18 +68,18 @@ SRAM.
|
||||||
|
|
||||||
The following steps outline the way in which memory interacts with the processor
|
The following steps outline the way in which memory interacts with the processor
|
||||||
during computational cycles, once the
|
during computational cycles, once the
|
||||||
[bootstrapping](/Operating_Systems/Boot_process.md) process has completed and
|
[bootstrapping](Boot_process.md) process has completed and
|
||||||
the OS kernel is itself loaded into memory.
|
the OS kernel is itself loaded into memory.
|
||||||
|
|
||||||
1. A file is loaded from the harddisk into memory.
|
1. A file is loaded from the harddisk into memory.
|
||||||
2. The instruction at the first address is sent to the CPU, travelling accross
|
2. The instruction at the first address is sent to the CPU, travelling accross
|
||||||
the data bus part of the [system bus](/Computer_Architecture/Bus.md).
|
the data bus part of the [system bus](Bus.md).
|
||||||
3. The CPU processes this instruction and then sends a request accross the
|
3. The CPU processes this instruction and then sends a request accross the
|
||||||
address bus part of the system bus for the next instruction to the memory
|
address bus part of the system bus for the next instruction to the memory
|
||||||
controller within the
|
controller within the
|
||||||
[chipset](/Computer_Architecture/Chipset_and_controllers.md).
|
[chipset](Chipset_and_controllers.md).
|
||||||
4. The chipset finds where this instruction is stored within the
|
4. The chipset finds where this instruction is stored within the
|
||||||
[DRAM](/Computer_Architecture/Memory/Memory.md#dram) and issues a request to
|
[DRAM](Memory.md#dram) and issues a request to
|
||||||
have it read out and send to the CPU over the data bus.
|
have it read out and send to the CPU over the data bus.
|
||||||
|
|
||||||
> This is a simplified account; it is not the case that only single requests are
|
> This is a simplified account; it is not the case that only single requests are
|
||||||
|
|
@ -177,7 +177,7 @@ is the number of bits.
|
||||||
|
|
||||||
We need to reverse this formula to find out how many bits we need to represent a
|
We need to reverse this formula to find out how many bits we need to represent a
|
||||||
given number of addresses. We can do this with a
|
given number of addresses. We can do this with a
|
||||||
[logarithm](/Mathematics/Algebra/Logarithms.md).
|
[logarithm](Logarithms.md).
|
||||||
|
|
||||||
We can reverse the formula as follows: number of bits = $\log_2$(number of
|
We can reverse the formula as follows: number of bits = $\log_2$(number of
|
||||||
addresses).
|
addresses).
|
||||||
|
|
@ -195,7 +195,7 @@ Using memory addresses we end up with tables like the following:
|
||||||
| 0000000000000010 | 0010001001001010 |
|
| 0000000000000010 | 0010001001001010 |
|
||||||
|
|
||||||
This is hard to parse so we can instead use
|
This is hard to parse so we can instead use
|
||||||
[hexadecimal numbers](/Electronics_and_Hardware/Binary/Hexadecimal_number_system.md)
|
[hexadecimal numbers](Hexadecimal_number_system.md)
|
||||||
to represent the addresses:
|
to represent the addresses:
|
||||||
|
|
||||||
| Memory address (as hex) | Data (as binary) |
|
| Memory address (as hex) | Data (as binary) |
|
||||||
|
|
@ -205,7 +205,7 @@ to represent the addresses:
|
||||||
| 0x0002 | 0010001001001010 |
|
| 0x0002 | 0010001001001010 |
|
||||||
|
|
||||||
By itself, the the data is meaningless but we know from
|
By itself, the the data is meaningless but we know from
|
||||||
[binary encoding](/Electronics_and_Hardware/Binary/Binary_encoding.md) that the
|
[binary encoding](Binary_encoding.md) that the
|
||||||
binary data will correspond to some meaningful data, such as a character or a
|
binary data will correspond to some meaningful data, such as a character or a
|
||||||
colour, depending on the encoding scheme used. The above table could correspond
|
colour, depending on the encoding scheme used. The above table could correspond
|
||||||
to the characters for 'A', 'B' and 'C' in the ASCII encoding scheme:
|
to the characters for 'A', 'B' and 'C' in the ASCII encoding scheme:
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ apps and software components built in AWS, with automatic encryption. It helps
|
||||||
with decoupling and scaling.
|
with decoupling and scaling.
|
||||||
|
|
||||||
As the name indicates, its operating mode is that of a
|
As the name indicates, its operating mode is that of a
|
||||||
[queue](/Data_Structures/Queue.md) data structure offering first-in, first-out
|
[queue](Queue.md) data structure offering first-in, first-out
|
||||||
and other queue implementations.
|
and other queue implementations.
|
||||||
|
|
||||||
An example application of this would be to set up an SQS queue that receives
|
An example application of this would be to set up an SQS queue that receives
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,10 @@ It would make more sense to run this only in development.
|
||||||
### Accessing current Node environment
|
### Accessing current Node environment
|
||||||
|
|
||||||
We can control which middleware we run via the Node envrionment variables:
|
We can control which middleware we run via the Node envrionment variables:
|
||||||
`process.env` (see for instance [ports](./Ports.md)).
|
`process.env` (see for instance [ports](Ports.md)).
|
||||||
|
|
||||||
We could set
|
We could set
|
||||||
[Morgan](/Programming_Languages/NodeJS/Modules/Third_party/Morgan.md) to run
|
[Morgan](Morgan.md) to run
|
||||||
only in development with:
|
only in development with:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ $$
|
||||||
$$
|
$$
|
||||||
|
|
||||||
But we know that when we
|
But we know that when we
|
||||||
[add fractions with a common denominator](./Add_Subtract_Fractions.md#adding-subracting-fractions-with-common-denominators),
|
[add fractions with a common denominator](Add_Subtract_Fractions.md#adding-subracting-fractions-with-common-denominators),
|
||||||
we only add the numerators, not the denominators. Thus the calculation would
|
we only add the numerators, not the denominators. Thus the calculation would
|
||||||
actually be:
|
actually be:
|
||||||
|
|
||||||
|
|
@ -108,7 +108,7 @@ $$
|
||||||
$$
|
$$
|
||||||
|
|
||||||
2. Then carry out the multiplication
|
2. Then carry out the multiplication
|
||||||
[using factorization](./Multiplying_fractions.md#prime-factorisation-in-place):
|
[using factorization](Multiplying_fractions.md#prime-factorisation-in-place):
|
||||||
|
|
||||||
$$
|
$$
|
||||||
\begin{split}
|
\begin{split}
|
||||||
|
|
@ -137,7 +137,7 @@ $$
|
||||||
|
|
||||||
Again we convert the mixed fraction into an improper fraction and then follow
|
Again we convert the mixed fraction into an improper fraction and then follow
|
||||||
the requisite rule, in the case of division this is to
|
the requisite rule, in the case of division this is to
|
||||||
[invert and multiply]('./../Dividing_fractions.md#formal-specification-of-how-to-divide-fractions').
|
[invert and multiply](Dividing_fractions.md#formal-specification-of-how-to-divide-fractions').
|
||||||
|
|
||||||
Calculate $-4 \frac{4}{5} \div 5 \frac{3}{5}$.
|
Calculate $-4 \frac{4}{5} \div 5 \frac{3}{5}$.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ a collection with the proprties `age` and `publications` and the author name,
|
||||||
say `Tosh Gnomay` was a document in this collection? This means we would have an
|
say `Tosh Gnomay` was a document in this collection? This means we would have an
|
||||||
interaction between two collections. In this entry we will look at how to work
|
interaction between two collections. In this entry we will look at how to work
|
||||||
with interrelated collections. This is equivalent to establishing
|
with interrelated collections. This is equivalent to establishing
|
||||||
[joins](/Databases/SQL/10_Joins.md) in a relational database.
|
[joins](10_Joins.md) in a relational database.
|
||||||
|
|
||||||
There are two main approaches to modelling relationships between data:
|
There are two main approaches to modelling relationships between data:
|
||||||
**normalisation** and **denormalisation**.
|
**normalisation** and **denormalisation**.
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ tags: [systems-programming]
|
||||||
|
|
||||||
### `top`/`htop`
|
### `top`/`htop`
|
||||||
|
|
||||||
We can use [ps](/Programming_Languages/Shell_Scripting/Processes.md) to list the
|
We can use [ps](Processes.md) to list the
|
||||||
currently running processes but it does not provide much information about the
|
currently running processes but it does not provide much information about the
|
||||||
resource metrics or how the process changes over time. We can use `top` to get
|
resource metrics or how the process changes over time. We can use `top` to get
|
||||||
more information.
|
more information.
|
||||||
|
|
@ -60,7 +60,7 @@ _Here I have pressed `u` to show only the processes associated with my user:_
|
||||||
```
|
```
|
||||||
- `VIRT`
|
- `VIRT`
|
||||||
- The total amount of
|
- The total amount of
|
||||||
[virtual memory](/Operating_Systems/Virtual_memory_and_the_MMU.md) used by
|
[virtual memory](Virtual_memory_and_the_MMU.md) used by
|
||||||
the process including: program code, data, shared libraries, pages that have
|
the process including: program code, data, shared libraries, pages that have
|
||||||
been swapped, pages that have been mapped but not used.
|
been swapped, pages that have been mapped but not used.
|
||||||
- `RES`
|
- `RES`
|
||||||
|
|
@ -68,7 +68,7 @@ _Here I have pressed `u` to show only the processes associated with my user:_
|
||||||
- The non swapped _physical_ memory the process has used
|
- The non swapped _physical_ memory the process has used
|
||||||
- `SHR`
|
- `SHR`
|
||||||
- The size of the process's
|
- The size of the process's
|
||||||
[shared pages](/Operating_Systems/Virtual_memory_and_the_MMU.md#shared-pages)
|
[shared pages](Virtual_memory_and_the_MMU.md#shared-pages)
|
||||||
- `S`
|
- `S`
|
||||||
- Status:
|
- Status:
|
||||||
- S for sleeping (idle)
|
- S for sleeping (idle)
|
||||||
|
|
@ -104,13 +104,13 @@ procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
|
||||||
- Total kbs swapped to disk
|
- Total kbs swapped to disk
|
||||||
- Total kbs free
|
- Total kbs free
|
||||||
- Total kbs currently in
|
- Total kbs currently in
|
||||||
[buffer](/Hardware/Memory/Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
|
[buffer](Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
|
||||||
and not written
|
and not written
|
||||||
- Total amount of virtual memory in the
|
- Total amount of virtual memory in the
|
||||||
[cache](/Hardware/Memory/Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
|
[cache](Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
|
||||||
- `swap`
|
- `swap`
|
||||||
- Distinguishes amount of memory
|
- Distinguishes amount of memory
|
||||||
[swapped](/Operating_Systems/Disks/Swap_space.md) in (`si`) to memory and
|
[swapped](Swap_space.md) in (`si`) to memory and
|
||||||
swapped out (`so`) to disk
|
swapped out (`so`) to disk
|
||||||
- `io`
|
- `io`
|
||||||
- Disk actions
|
- Disk actions
|
||||||
|
|
@ -135,7 +135,7 @@ gives me some useful info about which files VS Code is using:
|
||||||
## System calls: `strace`
|
## System calls: `strace`
|
||||||
|
|
||||||
A system call is when a process requests a service from the
|
A system call is when a process requests a service from the
|
||||||
[kernel](/Operating_Systems/The_Kernel.md), for instance an I/O operation to
|
[kernel](The_Kernel.md), for instance an I/O operation to
|
||||||
memory. We can trace these system calls with `strace`.
|
memory. We can trace these system calls with `strace`.
|
||||||
|
|
||||||
## CPU performance
|
## CPU performance
|
||||||
|
|
@ -167,7 +167,7 @@ $ uptime
|
||||||
|
|
||||||
We know that processes primarily interact with virtual memory in the form of
|
We know that processes primarily interact with virtual memory in the form of
|
||||||
pages which are then translated to physical blocks by the kernel via the
|
pages which are then translated to physical blocks by the kernel via the
|
||||||
[MMU](/Operating_Systems/Virtual_memory_and_the_MMU.md). There are several tools
|
[MMU](Virtual_memory_and_the_MMU.md). There are several tools
|
||||||
which provide windows onto this process.
|
which provide windows onto this process.
|
||||||
|
|
||||||
### System page size
|
### System page size
|
||||||
|
|
@ -186,7 +186,7 @@ This will typically be the same for all Linux systems.
|
||||||
|
|
||||||
`free` displays the total amount of free and¬used physical and swap memory in
|
`free` displays the total amount of free and¬used physical and swap memory in
|
||||||
the system, as well as the
|
the system, as well as the
|
||||||
[buffers and caches](/Hardware/Memory/Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
|
[buffers and caches](Role_of_memory_in_computation.md#relation-between-cache-and-buffers)
|
||||||
used by the kernel.
|
used by the kernel.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ tags: [motherboard]
|
||||||
|
|
||||||
The motherboard is the foundation of a computer. It allocates power and allows
|
The motherboard is the foundation of a computer. It allocates power and allows
|
||||||
communication to and between the
|
communication to and between the
|
||||||
[CPU](/Computer_Architecture/CPU/CPU_architecture.md),
|
[CPU](CPU_architecture.md),
|
||||||
[RAM](/Computer_Architecture/Memory/Memory.md),
|
[RAM](Memory.md),
|
||||||
[harddisk](/Operating_Systems/Disks/What_are_disks.md) and all other hardware
|
[harddisk](What_are_disks.md) and all other hardware
|
||||||
components.
|
components.
|
||||||
|
|
||||||
It is a printed circuit board and is always the largest board within the
|
It is a printed circuit board and is always the largest board within the
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ $$
|
||||||
|
|
||||||
It would be laborious to reduce such a large product using factor trees or the
|
It would be laborious to reduce such a large product using factor trees or the
|
||||||
repeated application of divisors, as defined in
|
repeated application of divisors, as defined in
|
||||||
[reducing fractions](./Reducing_fractions.md). We can use a more efficient
|
[reducing fractions](Reducing_fractions.md). We can use a more efficient
|
||||||
method. This method can be applied at the point at which we conduct the
|
method. This method can be applied at the point at which we conduct the
|
||||||
multiplication rather than afterwards once we have the product. We express the
|
multiplication rather than afterwards once we have the product. We express the
|
||||||
the initial multiplicands as prime factors:
|
the initial multiplicands as prime factors:
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ const resolvers = {
|
||||||
We invoke the `useMutation` hook to issue mutations from the client-side.
|
We invoke the `useMutation` hook to issue mutations from the client-side.
|
||||||
|
|
||||||
As with queries and
|
As with queries and
|
||||||
[query constants](/Databases/GraphQL/Apollo/Apollo_Client.md#query-constants) we
|
[query constants](Apollo_Client.md#query-constants) we
|
||||||
wrap our mutation in a `gql` template string:
|
wrap our mutation in a `gql` template string:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ tags: []
|
||||||
|
|
||||||
# Negation Elimination
|
# Negation Elimination
|
||||||
|
|
||||||
Like the [introduction](/Logic/Proofs/Negation_Introduction.md) rule for
|
Like the [introduction](Negation_Introduction.md) rule for
|
||||||
negation, the elimination rule also works by deriving a contradiction. It is
|
negation, the elimination rule also works by deriving a contradiction. It is
|
||||||
basically _Negation Introduction_ in reverse. Instead of starting the sub-proof
|
basically _Negation Introduction_ in reverse. Instead of starting the sub-proof
|
||||||
with a true proposition from which you derive a contradiction, you start with
|
with a true proposition from which you derive a contradiction, you start with
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [python, APIs]
|
||||||
# Making network requests in Python
|
# Making network requests in Python
|
||||||
|
|
||||||
We can use the `requests` package to make API requests to
|
We can use the `requests` package to make API requests to
|
||||||
[RESTful](/Databases/REST/RESTful_APIs.md) resources and handle the data as
|
[RESTful](RESTful_APIs.md) resources and handle the data as
|
||||||
JSON.
|
JSON.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
@ -68,7 +68,7 @@ Running `main` returns:
|
||||||
```
|
```
|
||||||
|
|
||||||
This is JSON but in Python is a
|
This is JSON but in Python is a
|
||||||
[dictionary](/Programming_Languages/Python/Syntax/Dictionaries_in_Python.md)
|
[dictionary](Dictionaries_in_Python.md)
|
||||||
|
|
||||||
We can use standard dictionary methods to handle the data. For example, we'll
|
We can use standard dictionary methods to handle the data. For example, we'll
|
||||||
add to the existing `try` block:
|
add to the existing `try` block:
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [docker, SQL, node-js]
|
||||||
|
|
||||||
# Docker example: NodeJS backend with MySQL database
|
# Docker example: NodeJS backend with MySQL database
|
||||||
|
|
||||||
We will utilise [Docker Compose](/DevOps/Docker/Docker_Compose.md) to combine
|
We will utilise [Docker Compose](Docker_Compose.md) to combine
|
||||||
two containers:
|
two containers:
|
||||||
|
|
||||||
- A container for the NodeJS backend
|
- A container for the NodeJS backend
|
||||||
|
|
@ -19,7 +19,7 @@ configuration.
|
||||||
|
|
||||||
Each of the files listed below would be saved to the same source directory which
|
Each of the files listed below would be saved to the same source directory which
|
||||||
would then form the basis of the
|
would then form the basis of the
|
||||||
[build context](/DevOps/Docker/Creating_a_Docker_image.md#creating-a-docker-image).
|
[build context](Creating_a_Docker_image.md#creating-a-docker-image).
|
||||||
|
|
||||||
## Docker Compose file
|
## Docker Compose file
|
||||||
|
|
||||||
|
|
@ -136,7 +136,7 @@ docker-compose -up
|
||||||
|
|
||||||
In the example, the database connection information in the Node source is coming
|
In the example, the database connection information in the Node source is coming
|
||||||
from the
|
from the
|
||||||
[`process.env`](/Programming_Languages/NodeJS/Architecture/Managing_environments.md)
|
[`process.env`](Managing_environments.md)
|
||||||
object, which itself is sourcing the values `MYSQL_HOST`, `MYSQL_PASSWORD` etc
|
object, which itself is sourcing the values `MYSQL_HOST`, `MYSQL_PASSWORD` etc
|
||||||
from the Docker compose file. Therefore these values are hardcoded there.
|
from the Docker compose file. Therefore these values are hardcoded there.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,5 +36,5 @@ However it should be used carefully and sparingly because you are obviously
|
||||||
turning off core type-checking and overuse nullifies the purpose of TypeScript.
|
turning off core type-checking and overuse nullifies the purpose of TypeScript.
|
||||||
|
|
||||||
One way to get around it is to use better
|
One way to get around it is to use better
|
||||||
[type-guarding](./Type_guarding_and_narrowing.md) and conditionality and to
|
[type-guarding](Type_guarding_and_narrowing.md) and conditionality and to
|
||||||
cover cases where the value may be undefined.
|
cover cases where the value may be undefined.
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ tags: [physics, electricity]
|
||||||
# Ohm's Law
|
# Ohm's Law
|
||||||
|
|
||||||
The relationship between
|
The relationship between
|
||||||
[current](/Electronics_and_Hardware/Analogue_circuits/Current.md),
|
[current](Current.md),
|
||||||
[voltage](/Electronics_and_Hardware/Analogue_circuits/Voltage.md), and
|
[voltage](Voltage.md), and
|
||||||
[resistance](/Electronics_and_Hardware/Analogue_circuits/Resistance.md) is
|
[resistance](Resistance.md) is
|
||||||
defined by Ohm's Law:
|
defined by Ohm's Law:
|
||||||
|
|
||||||
> The current flowing from one point to another is equal to the voltage accross
|
> The current flowing from one point to another is equal to the voltage accross
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ We can pinpoint specific dependencies in the `package.json`, e.g.
|
||||||
See whether your dependency version is out of date use `npm outdated`. This
|
See whether your dependency version is out of date use `npm outdated`. This
|
||||||
gives us a table, for example:
|
gives us a table, for example:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- _Latest_ tells us the latest release available from the developers
|
- _Latest_ tells us the latest release available from the developers
|
||||||
- _Wanted_ tells us the version that our `package.json` rules target. To take
|
- _Wanted_ tells us the version that our `package.json` rules target. To take
|
||||||
|
|
@ -48,4 +48,4 @@ gives us a table, for example:
|
||||||
|
|
||||||
`npm update` only updates from _current_ to _wanted_. In other words it only
|
`npm update` only updates from _current_ to _wanted_. In other words it only
|
||||||
updates in accordance with your caret and tilde rules applied to
|
updates in accordance with your caret and tilde rules applied to
|
||||||
[semantic versioning](/Software_Engineering/Semantic_versioning.md).
|
[semantic versioning](Semantic_versioning.md).
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ tags:
|
||||||
|
|
||||||
# Disk partitions
|
# Disk partitions
|
||||||
|
|
||||||
A disk is divided up into [partitions](/Operating_Systems/Disks/Partitions.md)
|
A disk is divided up into [partitions](Partitions.md)
|
||||||
which are subsections of the overall disk. The kernel presents each partition as
|
which are subsections of the overall disk. The kernel presents each partition as
|
||||||
a [block device](/Operating_Systems/Devices.md#Devices) as it would with an
|
a [block device](Devices.md#Devices) as it would with an
|
||||||
entire disk.
|
entire disk.
|
||||||
|
|
||||||
The disk dedicates a small part of its contents to a **partition table**: this
|
The disk dedicates a small part of its contents to a **partition table**: this
|
||||||
|
|
@ -81,7 +81,7 @@ The two tools disclose that the main harddrive is `/dev/nvme0n1` (equivalent to
|
||||||
the BIOS. In Linux this will be GRUB.
|
the BIOS. In Linux this will be GRUB.
|
||||||
- Root dir (`/dev/nvme0n1p2`)
|
- Root dir (`/dev/nvme0n1p2`)
|
||||||
- This is the domain of the
|
- This is the domain of the
|
||||||
[superuser](/Operating_Systems/User_Space.md#root-user-superuser). The part
|
[superuser](User_Space.md#root-user-superuser). The part
|
||||||
of the filesystem that you need sudo priveleges to access and where you
|
of the filesystem that you need sudo priveleges to access and where you
|
||||||
manage users
|
manage users
|
||||||
- Home dir (`/dev/nvme0n1p3`)
|
- Home dir (`/dev/nvme0n1p3`)
|
||||||
|
|
@ -101,7 +101,7 @@ Most standard partition tables allow for primary, extended and logical
|
||||||
partitions. The primary partition is the part of the harddisk that contains the
|
partitions. The primary partition is the part of the harddisk that contains the
|
||||||
operating system and is thus described as 'bootable' and may be called the 'boot
|
operating system and is thus described as 'bootable' and may be called the 'boot
|
||||||
partition'. During the bootstrapping process this is injected into memory as the
|
partition'. During the bootstrapping process this is injected into memory as the
|
||||||
[kernel](/Operating_Systems/The_Kernel.md).
|
[kernel](The_Kernel.md).
|
||||||
|
|
||||||
The extended partition is basically everything other than the primary partition.
|
The extended partition is basically everything other than the primary partition.
|
||||||
This is typically subdivided into other partitions that are called _logical_
|
This is typically subdivided into other partitions that are called _logical_
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ must run `chmod` to make them executable. When we issue a command like
|
||||||
|
|
||||||
When we run a program like `cd` or `npm` we don’t have to type `./cd.sh` or
|
When we run a program like `cd` or `npm` we don’t have to type `./cd.sh` or
|
||||||
`./npm.sh`. This is because a reference to the program file is already in our
|
`./npm.sh`. This is because a reference to the program file is already in our
|
||||||
[`$PATH`](/Programming_Languages/Shell/The_PATH.md).
|
[`$PATH`](The_PATH.md).
|
||||||
|
|
||||||
In the case of `cd`, this is an in-built program and as such it will be sourced
|
In the case of `cd`, this is an in-built program and as such it will be sourced
|
||||||
from a binary and we have a reference to the binary in path. In the case of
|
from a binary and we have a reference to the binary in path. In the case of
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,10 @@ boilerplate:
|
||||||
|
|
||||||
## Adding a trigger
|
## Adding a trigger
|
||||||
|
|
||||||
Next we need to add a [trigger](/DevOps/AWS/AWS_Lambda/Lambda_triggers.md) that
|
Next we need to add a [trigger](Lambda_triggers.md) that
|
||||||
execute the handler.
|
execute the handler.
|
||||||
|
|
||||||
We will do this using [AWS API Gateway](/DevOps/AWS/AWS_API_Gateway.md). We
|
We will do this using [AWS API Gateway](AWS_API_Gateway.md). We
|
||||||
select "Add trigger" from the dashboard view and input basic settings:
|
select "Add trigger" from the dashboard view and input basic settings:
|
||||||
|
|
||||||

|

|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [physics, electricity, exponents]
|
||||||
# Prefixes for unit of electrical measurement
|
# Prefixes for unit of electrical measurement
|
||||||
|
|
||||||
In electronics we are often dealing with units that are very large or very
|
In electronics we are often dealing with units that are very large or very
|
||||||
small, thus we rely on [exponents](/Mathematics/Algebra/Exponents.md) for formal
|
small, thus we rely on [exponents](Exponents.md) for formal
|
||||||
expression.
|
expression.
|
||||||
|
|
||||||
| Prefix | Symbol | Expression as exponent | Expression as decimal value | English word |
|
| Prefix | Symbol | Expression as exponent | Expression as decimal value | English word |
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@ main approaches to this:
|
||||||
> $n$. We then repeat this process with the resulting factors working
|
> $n$. We then repeat this process with the resulting factors working
|
||||||
> recursively until the numbers we are left with are primes.
|
> recursively until the numbers we are left with are primes.
|
||||||
|
|
||||||

|

|
||||||
_The prime factors of 27 are 2, 3, 3_
|
_The prime factors of 27 are 2, 3, 3_
|
||||||
|
|
||||||
it doesn't matter which products we choose as the interim factors, we should
|
it doesn't matter which products we choose as the interim factors, we should
|
||||||
always reach the same outcome:
|
always reach the same outcome:
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,11 @@ const store: string[] = []; // Empty array
|
||||||
## Object
|
## Object
|
||||||
|
|
||||||
`Object` is a valid type declaration in TS but it is not particularly helpful
|
`Object` is a valid type declaration in TS but it is not particularly helpful
|
||||||
since it becomes similar to using [any](./Any.md) given that most primitive
|
since it becomes similar to using [any](Any.md) given that most primitive
|
||||||
types in JavaScripts prototypically inherit from an Object.
|
types in JavaScripts prototypically inherit from an Object.
|
||||||
|
|
||||||
Generally, when you use objects in TypeScript you type them as
|
Generally, when you use objects in TypeScript you type them as
|
||||||
[custom types](./Custom_types.md).
|
[custom types](Custom_types.md).
|
||||||
|
|
||||||
## Array of (untyped) objects
|
## Array of (untyped) objects
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags:
|
||||||
|
|
||||||
# Processes (`ps`)
|
# Processes (`ps`)
|
||||||
|
|
||||||
`ps` allows us to control [user processes](/Operating_Systems/The_Kernel.md)
|
`ps` allows us to control [user processes](The_Kernel.md)
|
||||||
from the shell.
|
from the shell.
|
||||||
|
|
||||||
The command in its most minimal application returns the following
|
The command in its most minimal application returns the following
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ tags: [python, data-types]
|
||||||
|
|
||||||
The core data-types are as follows:
|
The core data-types are as follows:
|
||||||
|
|
||||||
- [str](/Programming_Languages/Python/Syntax/Strings_in_Python.md)
|
- [str](Strings_in_Python.md)
|
||||||
- bool
|
- bool
|
||||||
- float
|
- float
|
||||||
- double
|
- double
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ In the standard implementation, the language which interprets Python code is C.
|
||||||
|
|
||||||
When Python runs in this implementation, code written in C converts it to
|
When Python runs in this implementation, code written in C converts it to
|
||||||
bytecode (so-called because each instruction is
|
bytecode (so-called because each instruction is
|
||||||
[8-bits long](/Hardware/Binary/Binary_units_of_measurement.md)). This is a
|
[8-bits long](Binary_units_of_measurement.md)). This is a
|
||||||
lower-level transliteration of Python is not meant to be understood by the CPU
|
lower-level transliteration of Python is not meant to be understood by the CPU
|
||||||
(since it is not binary) but rather to be run in the Python virtual machine
|
(since it is not binary) but rather to be run in the Python virtual machine
|
||||||
which is equipped to understand bytecode. The Python Virtual Machine is
|
which is equipped to understand bytecode. The Python Virtual Machine is
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ We now have the following entries in our `courses` collection:
|
||||||
|
|
||||||
Now we will query the collection. This capability is provided via the Mongoose
|
Now we will query the collection. This capability is provided via the Mongoose
|
||||||
schema class we used to create the `Course`
|
schema class we used to create the `Course`
|
||||||
[model](/Databases/MongoDB/Create_collections_and_documents_with_Mongoose.md#models).
|
[model](Create_collections_and_documents_with_Mongoose.md#models).
|
||||||
We have the following methods available to use from the schema:
|
We have the following methods available to use from the schema:
|
||||||
|
|
||||||
- `find`
|
- `find`
|
||||||
|
|
@ -168,7 +168,7 @@ When we apply logical operators, we do not apply the query within the main
|
||||||
predicate.
|
predicate.
|
||||||
|
|
||||||
For example to query by logical
|
For example to query by logical
|
||||||
[OR](/Logic/Truth-functional_connectives.md#disjunction):
|
[OR](Truth-functional_connectives.md#disjunction):
|
||||||
|
|
||||||
```js
|
```js
|
||||||
async function getCourses() {
|
async function getCourses() {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ tags:
|
||||||
|
|
||||||
_Visualization of the queue data structure_
|
_Visualization of the queue data structure_
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## A queue is a sequential data structure and most similar to a stack
|
## A queue is a sequential data structure and most similar to a stack
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ In order to qualify as RESTful, an API must meet the following constraints:
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
A basic example of a REST API would be a series of methods corresponding to the
|
A basic example of a REST API would be a series of methods corresponding to the
|
||||||
main [HTTP request types](/Databases/HTTP_request_types.md).
|
main [HTTP request types](HTTP_request_types.md).
|
||||||
|
|
||||||
| HTTP request type | URI | Action | Body ? |
|
| HTTP request type | URI | Action | Body ? |
|
||||||
| ----------------- | ------------------- | --------------------------- | ------------------------ |
|
| ----------------- | ------------------- | --------------------------- | ------------------------ |
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ piped to it. In each case, what is read is stored as a variable.
|
||||||
|
|
||||||
`read` will parse line by line using a space (`\n`) as the default delimiter.
|
`read` will parse line by line using a space (`\n`) as the default delimiter.
|
||||||
You can use IFS to parse by other characters and/or
|
You can use IFS to parse by other characters and/or
|
||||||
[split the contents into an array](/Programming_Languages/Shell/Split_into_array.md).
|
[split the contents into an array](Split_into_array.md).
|
||||||
|
|
||||||
## Example of capturing user input
|
## Example of capturing user input
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ read
|
||||||
|
|
||||||
## Example of piping to read
|
## Example of piping to read
|
||||||
|
|
||||||
Here we use [find](/Programming_Languages/Shell/Find.md) to collate the files in
|
Here we use [find](Find.md) to collate the files in
|
||||||
the current directory and then pipe them to read.
|
the current directory and then pipe them to read.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ request.
|
||||||
## Difference from cherry-picking
|
## Difference from cherry-picking
|
||||||
|
|
||||||
The main difference between the two approaches is that
|
The main difference between the two approaches is that
|
||||||
[cherry-picking](/DevOps/Git/Cherry_picking_a_branch.md) is a more selective
|
[cherry-picking](Cherry_picking_a_branch.md) is a more selective
|
||||||
process, where you can pick and choose specific commits that you want to include
|
process, where you can pick and choose specific commits that you want to include
|
||||||
in another branch. This can be useful when you only want to apply specific
|
in another branch. This can be useful when you only want to apply specific
|
||||||
changes or fixes from one branch to another, without including all the changes
|
changes or fixes from one branch to another, without including all the changes
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ another example. Also fractals display recursive properties.
|
||||||
## Schema
|
## Schema
|
||||||
|
|
||||||
The general structure of a recursive function is as follows:
|
The general structure of a recursive function is as follows:
|
||||||

|

|
||||||
|
|
||||||
## Why use recursive functions?
|
## Why use recursive functions?
|
||||||
|
|
||||||
|
|
@ -131,4 +131,4 @@ if (num > 0) {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||

|

|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ because you don't want it to be output to `stdout`.
|
||||||
|
|
||||||
The `2>&1` argument is the content: any errors that the program may generate and
|
The `2>&1` argument is the content: any errors that the program may generate and
|
||||||
try to show in stout. Notice we are using the
|
try to show in stout. Notice we are using the
|
||||||
[file descriptors](/Programming_Languages/Shell/File_descriptors_and_redirection.md)
|
[file descriptors](File_descriptors_and_redirection.md)
|
||||||
`1` and `2`.
|
`1` and `2`.
|
||||||
|
|
||||||
If you just want the errors regardless of whether they appear in `stdout` you
|
If you just want the errors regardless of whether they appear in `stdout` you
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ ls | grep d* > result.txt
|
||||||
### Combining redirection with file escriptors
|
### Combining redirection with file escriptors
|
||||||
|
|
||||||
It is common practice to combine redirection with the
|
It is common practice to combine redirection with the
|
||||||
[file descriptors](/Programming_Languages/Shell/File_descriptors.md) to redirect
|
[file descriptors](File_descriptors.md) to redirect
|
||||||
the output of `stdout` and `stderr`. A common case is to
|
the output of `stdout` and `stderr`. A common case is to
|
||||||
[redirect error output to `/dev/null`](/Programming_Languages/Shell/Redirect_to_dev_null.md).
|
[redirect error output to `/dev/null`](Redirect_to_dev_null.md).
|
||||||
|
|
||||||
Redirection defaults to interpreting `>` as the redirection of `stdout` (`1`);
|
Redirection defaults to interpreting `>` as the redirection of `stdout` (`1`);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ A better method is to utilise [prime factorization](Prime%20factorization.md)
|
||||||
combined with the canceling technique.
|
combined with the canceling technique.
|
||||||
|
|
||||||
First we find the prime factors of both the numerator and denominator:
|
First we find the prime factors of both the numerator and denominator:
|
||||||

|

|
||||||
|
|
||||||
This gives us:
|
This gives us:
|
||||||
|
|
||||||
|
|
@ -163,7 +163,7 @@ _Reduce the following fraction to its lowest terms: $$\frac{14y^5}{-35y^3}$$_
|
||||||
|
|
||||||
- Apply [Prime factorization](Prime%20factorization.md):
|
- Apply [Prime factorization](Prime%20factorization.md):
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- Cancel the coefficients and variable parts
|
- Cancel the coefficients and variable parts
|
||||||
|
|
||||||
|
|
@ -179,7 +179,7 @@ $$\frac{- 12xy^2}{ - 18xy^2}$$_
|
||||||
|
|
||||||
- Apply [Prime factorization](Prime%20factorization.md):
|
- Apply [Prime factorization](Prime%20factorization.md):
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- Cancel the coefficients and variable parts
|
- Cancel the coefficients and variable parts
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ above' the actions of the CPU. This is wrong and if you think about it, how
|
||||||
could this be since any process, kernel included, requires the processor? The
|
could this be since any process, kernel included, requires the processor? The
|
||||||
kernel is executed by and loaded into the CPU just like any other instruction in
|
kernel is executed by and loaded into the CPU just like any other instruction in
|
||||||
the
|
the
|
||||||
[fetch, decode, execute cycle](/Computer_Architecture/CPU/Fetch_decode_execute.md)
|
[fetch, decode, execute cycle](Fetch_decode_execute.md)
|
||||||
of the CPU.
|
of the CPU.
|
||||||
|
|
||||||
However as a process, the kernel is the 'first amongst equals' given that it is
|
However as a process, the kernel is the 'first amongst equals' given that it is
|
||||||
|
|
@ -40,7 +40,7 @@ the CPU take place independently of the kernel.
|
||||||
> points the program counter back into kernel code. That’s basically what the
|
> points the program counter back into kernel code. That’s basically what the
|
||||||
> CPU will be doing from boot up to shut down; switching between executing
|
> CPU will be doing from boot up to shut down; switching between executing
|
||||||
> kernel code and executing userspace code
|
> kernel code and executing userspace code
|
||||||
> ([Reddit](https://www.reddit.com/r/osdev/comments/wdskj5/how_does_kernel_decide_if_use_cpu_or_gpu_after/))
|
> ([Reddit]())
|
||||||
|
|
||||||
This is because of [context switching](), when the CPU is running its cycle, the
|
This is because of [context switching](), when the CPU is running its cycle, the
|
||||||
kernel is idle waiting for it to complete. Once control switches back to the
|
kernel is idle waiting for it to complete. Once control switches back to the
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,9 @@ used to _control_ the flow of current in a circuit.
|
||||||
|
|
||||||
> One ohm is the resistance of a circuit or circuit element that permits a
|
> One ohm is the resistance of a circuit or circuit element that permits a
|
||||||
> steady current flow of one
|
> steady current flow of one
|
||||||
> [amp](/Electronics_and_Hardware/Analogue_circuits/Current.md#formal-expression)
|
> [amp](Current.md#formal-expression)
|
||||||
> (one coulomb/second) when one
|
> (one coulomb/second) when one
|
||||||
> [volt](/Electronics_and_Hardware/Analogue_circuits/Voltage.md#voltage) is
|
> [volt](Voltage.md#voltage) is
|
||||||
> applied to the circuit.
|
> applied to the circuit.
|
||||||
|
|
||||||
### Conductance
|
### Conductance
|
||||||
|
|
@ -56,7 +56,7 @@ used to _control_ the flow of current in a circuit.
|
||||||
## Ohm's Law
|
## Ohm's Law
|
||||||
|
|
||||||
The relationship between current, resistance and voltage is expressed in
|
The relationship between current, resistance and voltage is expressed in
|
||||||
[Ohm's Law](/Electronics_and_Hardware/Physics_of_electricity/Ohms_Law.md).
|
[Ohm's Law](Ohms_Law.md).
|
||||||
|
|
||||||
## Resistors
|
## Resistors
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ exports.handler = (event, context, callback) => {
|
||||||
|
|
||||||
Let's walk through the above example making reference to the general structure
|
Let's walk through the above example making reference to the general structure
|
||||||
of the
|
of the
|
||||||
[AWS Lambda handler function](/DevOps/AWS/AWS_Lambda/Lambda_handler_function.md):
|
[AWS Lambda handler function](Lambda_handler_function.md):
|
||||||
|
|
||||||
1. The `event` parameter is invoked to gain access to the event that triggered
|
1. The `event` parameter is invoked to gain access to the event that triggered
|
||||||
the function. This is a CloudFront request event which is targetted with
|
the function. This is a CloudFront request event which is targetted with
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ tags: [relational-databases]
|
||||||
|
|
||||||
This is essential for carrying out operations across database tables and for
|
This is essential for carrying out operations across database tables and for
|
||||||
creating and deleting database entires in accordance with the
|
creating and deleting database entires in accordance with the
|
||||||
[ACID principle](/Databases/ACID_principle.md). It is also a safeguard: it means
|
[ACID principle](ACID_principle.md). It is also a safeguard: it means
|
||||||
you can always identify a record by itself and don't have to rely on generic
|
you can always identify a record by itself and don't have to rely on generic
|
||||||
queries to identify it.
|
queries to identify it.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ shell**. If you run a script from the command line you will be in a
|
||||||
## Shell sessions and access
|
## Shell sessions and access
|
||||||
|
|
||||||
The type of shell session that you are currently in affects the
|
The type of shell session that you are currently in affects the
|
||||||
[environmental and shell variables](https://www.notion.so/Environmental-and-shell-variables-04d5ec7e8e2b486a93f002bf686e4bbb)
|
[environmental and shell variables](Environmental-and-shell-variables-04d5ec7e8e2b486a93f002bf686e4bbb)
|
||||||
that you can access. This is because the order in which configuration files are
|
that you can access. This is because the order in which configuration files are
|
||||||
read on initialisation differs depending on the type of shell.
|
read on initialisation differs depending on the type of shell.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ represented. **Unsigned binary** is standard binary without negative integers.
|
||||||
|
|
||||||
In order to represent negative integers alonside positive integers a natural
|
In order to represent negative integers alonside positive integers a natural
|
||||||
approach is to divide the available
|
approach is to divide the available
|
||||||
[encoding space / word length](/Electronics_and_Hardware/Binary/Binary_encoding.md)
|
[encoding space / word length](Binary_encoding.md)
|
||||||
into two subsets: one for representing non-negative integers and one for
|
into two subsets: one for representing non-negative integers and one for
|
||||||
representing negative integers.
|
representing negative integers.
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ The chief advantage of the two's complement technique of signing numbers is that
|
||||||
its circuit implementation is no different from the adding of two unsigned
|
its circuit implementation is no different from the adding of two unsigned
|
||||||
numbers. Once the signing algorithm is applied the addition can be passed
|
numbers. Once the signing algorithm is applied the addition can be passed
|
||||||
through an
|
through an
|
||||||
[adder](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md)
|
[adder](Half_adder_and_full_adder.md)
|
||||||
component without any special handling or additional hardware.
|
component without any special handling or additional hardware.
|
||||||
|
|
||||||
Let's demonstrate this with the following addition:
|
Let's demonstrate this with the following addition:
|
||||||
|
|
@ -121,7 +121,7 @@ The ease by which we conduct signed arithmetic with standard hardware contrasts
|
||||||
with alternative approaches to signing numbers. An example of another approach
|
with alternative approaches to signing numbers. An example of another approach
|
||||||
is **signed magnitude representation**. A basic implemetation of this would be
|
is **signed magnitude representation**. A basic implemetation of this would be
|
||||||
to say that for a given bit-length (6, 16, 32...) if the
|
to say that for a given bit-length (6, 16, 32...) if the
|
||||||
[most significant bit](/Electronics_and_Hardware/Digital_circuits/Half_adder_and_full_adder.md#binary-arithmetic)
|
[most significant bit](Half_adder_and_full_adder.md#binary-arithmetic)
|
||||||
is a 0 then the number is positive. If it is 1 then it is negative.
|
is a 0 then the number is positive. If it is 1 then it is negative.
|
||||||
|
|
||||||
This works but it requires extra complexity to in a system's design to account
|
This works but it requires extra complexity to in a system's design to account
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [algebra]
|
||||||
## Use inversion of operators
|
## Use inversion of operators
|
||||||
|
|
||||||
When solving equations we frequently make use of the
|
When solving equations we frequently make use of the
|
||||||
[ operator inversion rules](../Prealgebra/Inversion%20of%20operators.md) to find
|
[ operator inversion rules](Inversion%20of%20operators.md) to find
|
||||||
the solutions.
|
the solutions.
|
||||||
|
|
||||||
### Example: inversion of addition
|
### Example: inversion of addition
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [propositional-logic]
|
||||||
# Soundness
|
# Soundness
|
||||||
|
|
||||||
Recall that in the definition of
|
Recall that in the definition of
|
||||||
[deductive validity](/Logic/General_concepts/Validity_and_entailment.md#validity)
|
[deductive validity](Validity_and_entailment.md#validity)
|
||||||
we do not say: an argument is valid iff if the premises _are true_ and the
|
we do not say: an argument is valid iff if the premises _are true_ and the
|
||||||
conclusion _is true_. We say _if it is possible for the premises to be true_.
|
conclusion _is true_. We say _if it is possible for the premises to be true_.
|
||||||
This is important: we are not interested in the actual truth of the premises or
|
This is important: we are not interested in the actual truth of the premises or
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@ tags:
|
||||||
- data-structures
|
- data-structures
|
||||||
---
|
---
|
||||||
|
|
||||||
_A stack visualised vertically_ 
|
_A stack visualised vertically_ 
|
||||||
|
|
||||||
_A stack visualised horizontally_ 
|
_A stack visualised horizontally_ 
|
||||||
|
|
||||||
## A stack is a linear data structure that observes LIFO
|
## A stack is a linear data structure that observes LIFO
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [git]
|
||||||
# Stale branches and pruning
|
# Stale branches and pruning
|
||||||
|
|
||||||
A **stale branch** is a
|
A **stale branch** is a
|
||||||
[remote tracking branch](/DevOps/Git/Remote_tracking_branches.md) that **no
|
[remote tracking branch](Remote_tracking_branches.md) that **no
|
||||||
longer tracks anything** because the actual branch on the remote has been
|
longer tracks anything** because the actual branch on the remote has been
|
||||||
deleted.
|
deleted.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ transitions between them. It also includes error catchers and retry logic.
|
||||||
At the beginning you define a `StartAt` state which is the entrypoint of the
|
At the beginning you define a `StartAt` state which is the entrypoint of the
|
||||||
state machine. This can be manually triggered, or more likely, triggered by
|
state machine. This can be manually triggered, or more likely, triggered by
|
||||||
another AWS service such as a
|
another AWS service such as a
|
||||||
[Lambda](/DevOps/AWS/AWS_Lambda/Lambda_programming_model.md), an
|
[Lambda](Lambda_programming_model.md), an
|
||||||
[API Gateway](/DevOps/AWS/AWS_API_Gateway.md) request or a messaging/queue
|
[API Gateway](AWS_API_Gateway.md) request or a messaging/queue
|
||||||
event.
|
event.
|
||||||
|
|
||||||
The state machine ultimately ends at an end state. In between are various
|
The state machine ultimately ends at an end state. In between are various
|
||||||
|
|
|
||||||
|
|
@ -20,17 +20,17 @@ not always work and there will be cases where the route to the desired
|
||||||
derivation is more circuitous. In these instances it is to best to combine this
|
derivation is more circuitous. In these instances it is to best to combine this
|
||||||
general top level strategy with goal analysis.
|
general top level strategy with goal analysis.
|
||||||
|
|
||||||
Goal analysis is a [recursive](/Data_Structures/Recursion.md) strategy which
|
Goal analysis is a [recursive](Recursion.md) strategy which
|
||||||
proceeds by using a 'goal' proposition to guide the construction of intermediary
|
proceeds by using a 'goal' proposition to guide the construction of intermediary
|
||||||
derivations.
|
derivations.
|
||||||
|
|
||||||
Assume that we want to show that an argument is
|
Assume that we want to show that an argument is
|
||||||
[valid](/Logic/General_concepts/Validity_and_entailment.md#validity). Then our
|
[valid](Validity_and_entailment.md#validity). Then our
|
||||||
ultimate goal is to derive the conclusion from the premises we are given. We
|
ultimate goal is to derive the conclusion from the premises we are given. We
|
||||||
first ask ourselves: _which propositions if we could derive them, would allow us
|
first ask ourselves: _which propositions if we could derive them, would allow us
|
||||||
to easily derive the conclusion_? (For example, these propositions might be two
|
to easily derive the conclusion_? (For example, these propositions might be two
|
||||||
simple propositions that when combined with
|
simple propositions that when combined with
|
||||||
[Conjunction Introduction](/Logic/Proofs/Conjunction_Introduction.md) give us
|
[Conjunction Introduction](Conjunction_Introduction.md) give us
|
||||||
the conclusion.) Deriving these propositions then becomes the new intermediate
|
the conclusion.) Deriving these propositions then becomes the new intermediate
|
||||||
goal.
|
goal.
|
||||||
|
|
||||||
|
|
@ -48,7 +48,7 @@ and $((\lnot N \rightarrow L) \land (D \leftrightarrow \lnot N))$.
|
||||||
First, we consider what is the easiest possible way of achieving the proposition
|
First, we consider what is the easiest possible way of achieving the proposition
|
||||||
$(L \lor A) \land D$. Clearly it is to separately derive each disjunct
|
$(L \lor A) \land D$. Clearly it is to separately derive each disjunct
|
||||||
($L \lor A$ and $D$) and then combine them with
|
($L \lor A$ and $D$) and then combine them with
|
||||||
[Conjunction Introduction](/Logic/Proofs/Conditional_Introduction.md). This
|
[Conjunction Introduction](Conditional_Introduction.md). This
|
||||||
provides us with our first goal: to derive each of the separate conjuncts.
|
provides us with our first goal: to derive each of the separate conjuncts.
|
||||||
|
|
||||||
Let's start with $D$: where does it occur in the assumptions? It occurs in the
|
Let's start with $D$: where does it occur in the assumptions? It occurs in the
|
||||||
|
|
@ -63,7 +63,7 @@ So far we have:
|
||||||
Now we just need to get $D$ from the proposition at line 3. This is easy since
|
Now we just need to get $D$ from the proposition at line 3. This is easy since
|
||||||
we already have access to the consequent of the biconditional at line 1.
|
we already have access to the consequent of the biconditional at line 1.
|
||||||
Therefore we can apply
|
Therefore we can apply
|
||||||
[Biconditional Elimination](/Logic/Proofs/Biconditional_Elimination.md)) at line
|
[Biconditional Elimination](Biconditional_Elimination.md)) at line
|
||||||
3 to get $D$. We are now halfway there:
|
3 to get $D$. We are now halfway there:
|
||||||
|
|
||||||

|

|
||||||
|
|
@ -71,20 +71,20 @@ Therefore we can apply
|
||||||
Next we need to turn our attention to deriving $L \lor A$. How can we obtain $L$
|
Next we need to turn our attention to deriving $L \lor A$. How can we obtain $L$
|
||||||
? Well it is contained within the first conjunct of the assumption on line 2.
|
? Well it is contained within the first conjunct of the assumption on line 2.
|
||||||
Again, we can get this through the application of
|
Again, we can get this through the application of
|
||||||
[Conjunction Elimination](/Logic/Proofs/Conjunction_Elimination.md). Now, how do
|
[Conjunction Elimination](Conjunction_Elimination.md). Now, how do
|
||||||
we get $L$ from $(\lnot N \rightarrow L)$? Well, we already have the antecedent
|
we get $L$ from $(\lnot N \rightarrow L)$? Well, we already have the antecedent
|
||||||
$\lnot N$ as an assumption on the first line, so we can use
|
$\lnot N$ as an assumption on the first line, so we can use
|
||||||
[Conditional Elimination](/Logic/Proofs/Conditional_Elimination.md) to derive
|
[Conditional Elimination](Conditional_Elimination.md) to derive
|
||||||
$L$. These two steps give us:
|
$L$. These two steps give us:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Now we need to get from $L$ to $L \lor A$. This is really straightforward
|
Now we need to get from $L$ to $L \lor A$. This is really straightforward
|
||||||
because by using
|
because by using
|
||||||
[Disjunction Introduction](/Logic/Proofs/Disjunction_Introduction.md)) we can
|
[Disjunction Introduction](Disjunction_Introduction.md)) we can
|
||||||
get from any sentence to a disjunction. Finally, having assembled all the
|
get from any sentence to a disjunction. Finally, having assembled all the
|
||||||
constituent parts of the conjunction that is the conclusion, we can combine them
|
constituent parts of the conjunction that is the conclusion, we can combine them
|
||||||
with [Conjunction Introduction](/Logic/Proofs/Conjunction_Introduction.md) as we
|
with [Conjunction Introduction](Conjunction_Introduction.md) as we
|
||||||
had planned at the outset.
|
had planned at the outset.
|
||||||
|
|
||||||

|

|
||||||
|
|
@ -100,21 +100,21 @@ $$
|
||||||
The requirements here could easily mislead us. We see that the target
|
The requirements here could easily mislead us. We see that the target
|
||||||
proposition is a conjunction so we might think that the best strategy is to seek
|
proposition is a conjunction so we might think that the best strategy is to seek
|
||||||
to derive each conjunct and then combine them via
|
to derive each conjunct and then combine them via
|
||||||
[Conjunction Introduction](/Logic/Proofs/Conjunction_Introduction.md)).
|
[Conjunction Introduction](Conjunction_Introduction.md)).
|
||||||
|
|
||||||
Actually, if we look more closely, there is a better approach. The target
|
Actually, if we look more closely, there is a better approach. The target
|
||||||
proposition is contained in the first premise as the consequent to the
|
proposition is contained in the first premise as the consequent to the
|
||||||
biconditional ($\lnot L \leftrightarrow [X \land (\lnot S \lor B)]$). A better
|
biconditional ($\lnot L \leftrightarrow [X \land (\lnot S \lor B)]$). A better
|
||||||
approach is therefore to seek to derive the antecedent ($\lnot L$) and then use
|
approach is therefore to seek to derive the antecedent ($\lnot L$) and then use
|
||||||
[Biconditional Elimination](/Logic/Proofs/Biconditional_Elimination.md) to
|
[Biconditional Elimination](Biconditional_Elimination.md) to
|
||||||
extract the target sentence which is the consequent.
|
extract the target sentence which is the consequent.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Proving theorems
|
## Proving theorems
|
||||||
|
|
||||||
When we are proving
|
When we are proving
|
||||||
[theorems](/Logic/Laws_and_theorems.md/Theorems_and_empty_sets.md#theorems-and-empty-sets)
|
[theorems](Theorems_and_empty_sets.md#theorems-and-empty-sets)
|
||||||
we do not have a set of assumptions to work from when constructing the proof. We
|
we do not have a set of assumptions to work from when constructing the proof. We
|
||||||
must derive the target sentence from the 'empty set' which is the target
|
must derive the target sentence from the 'empty set' which is the target
|
||||||
sentence itself. It is therefore like a process of reverse engineering.
|
sentence itself. It is therefore like a process of reverse engineering.
|
||||||
|
|
@ -143,7 +143,7 @@ _Prove_ $\vdash (\lnot A \lor \lnot B) \leftrightarrow \lnot(A \land B)$
|
||||||
$\lnot (A \lor B) \rightarrow \lnot (A \land B)$.
|
$\lnot (A \lor B) \rightarrow \lnot (A \land B)$.
|
||||||
|
|
||||||
- Our starting assumption is to a disjunction. Thus we can apply
|
- Our starting assumption is to a disjunction. Thus we can apply
|
||||||
[Disjunction Elimination](/Logic/Proofs/Disjunction_Elimination.md) to show
|
[Disjunction Elimination](Disjunction_Elimination.md) to show
|
||||||
that our goal sentence $\lnot(A \land B)$ follows from each of the disjuncts
|
that our goal sentence $\lnot(A \land B)$ follows from each of the disjuncts
|
||||||
($\lnot A$ and $\lnot B$) in dedicated sub-proofs. If we can do this, we have
|
($\lnot A$ and $\lnot B$) in dedicated sub-proofs. If we can do this, we have
|
||||||
the right to derive $\lnot (A \land B)$.
|
the right to derive $\lnot (A \land B)$.
|
||||||
|
|
@ -154,7 +154,7 @@ _Prove_ $\vdash (\lnot A \lor \lnot B) \leftrightarrow \lnot(A \land B)$
|
||||||
$A \land B$ so that we can negate it as $\lnot (A \land B)$.
|
$A \land B$ so that we can negate it as $\lnot (A \land B)$.
|
||||||
|
|
||||||
- Having done this, we can discharge the
|
- Having done this, we can discharge the
|
||||||
[Disjunction Elimination](/Logic/Proofs/Disjunction_Elimination.md) sub-proofs
|
[Disjunction Elimination](Disjunction_Elimination.md) sub-proofs
|
||||||
and derive $\lnot (A \land B)$ from $\lnot A \lor \lnot B$
|
and derive $\lnot (A \land B)$ from $\lnot A \lor \lnot B$
|
||||||
|
|
||||||
**Lines 13-26**
|
**Lines 13-26**
|
||||||
|
|
@ -165,9 +165,9 @@ _Prove_ $\vdash (\lnot A \lor \lnot B) \leftrightarrow \lnot(A \land B)$
|
||||||
anymore, we have a negated conjunction.
|
anymore, we have a negated conjunction.
|
||||||
- We will do this by assuming the negation of what we want to prove
|
- We will do this by assuming the negation of what we want to prove
|
||||||
($\lnot (\lnot A \lor \lnot B)$) and then apply
|
($\lnot (\lnot A \lor \lnot B)$) and then apply
|
||||||
[Negation Elimination](/Logic/Proofs/Negation_Elimination.md) to get
|
[Negation Elimination](Negation_Elimination.md) to get
|
||||||
$\lnot A \lor \lnot B$.
|
$\lnot A \lor \lnot B$.
|
||||||
- This requires us to derive a contradiction. We get this on lines 23 and 24.
|
- This requires us to derive a contradiction. We get this on lines 23 and 24.
|
||||||
This requires as previous steps that we have two sub-proofs that use
|
This requires as previous steps that we have two sub-proofs that use
|
||||||
[Negation Elimination](/Logic/Proofs/Negation_Elimination.md) to release $A$
|
[Negation Elimination](Negation_Elimination.md) to release $A$
|
||||||
and $B$
|
and $B$
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@ tags:
|
||||||
# Handling streams with fs
|
# Handling streams with fs
|
||||||
|
|
||||||
When reading from a file, the
|
When reading from a file, the
|
||||||
[`fs.readFile()`](/Programming_Languages/NodeJS/Modules/Core/fs.md) method waits
|
[`fs.readFile()`](fs.md) method waits
|
||||||
until the entire file has been read before executing the callback. It's obvious
|
until the entire file has been read before executing the callback. It's obvious
|
||||||
why this might not be ideal in certain cases. If the file is very large you are
|
why this might not be ideal in certain cases. If the file is very large you are
|
||||||
utilising a lot of [memory](/Computer_Architecture/Memory/Memory.md) for a
|
utilising a lot of [memory](Memory.md) for a
|
||||||
single process. Additionally, the data you need might appear early in the file,
|
single process. Additionally, the data you need might appear early in the file,
|
||||||
in which case, once you find the data you want, there is no need to read to the
|
in which case, once you find the data you want, there is no need to read to the
|
||||||
end of the file.
|
end of the file.
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ print(f'You are {user_age}')
|
||||||
|
|
||||||
The `split()` function in Python is used to divide a string into multiple parts
|
The `split()` function in Python is used to divide a string into multiple parts
|
||||||
at the occurrence of a given separator. This function returns a
|
at the occurrence of a given separator. This function returns a
|
||||||
[list](/Programming_Languages/Python/Syntax/Lists_in_Python.md) of substrings.
|
[list](Lists_in_Python.md) of substrings.
|
||||||
|
|
||||||
### General syntax
|
### General syntax
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,12 @@ Swap: 3145724 0 3145724
|
||||||
|
|
||||||
To use an existing disk partition as a swap you can run the command
|
To use an existing disk partition as a swap you can run the command
|
||||||
`mkswap [device]` and then `swapon [device]` to register the space with the
|
`mkswap [device]` and then `swapon [device]` to register the space with the
|
||||||
[kernel](/Operating_Systems/The_Kernel.md).
|
[kernel](The_Kernel.md).
|
||||||
|
|
||||||
### Add to `fstab`
|
### Add to `fstab`
|
||||||
|
|
||||||
You will want the swap to be activated every time the OS boots so add the
|
You will want the swap to be activated every time the OS boots so add the
|
||||||
following line to the [fstab](/Operating_Systems/Disks/Filesystems.md#fstab),
|
following line to the [fstab](Filesystems.md#fstab),
|
||||||
where `/sda3` is used as the example partition:
|
where `/sda3` is used as the example partition:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [propositional-logic]
|
||||||
# Syllogism
|
# Syllogism
|
||||||
|
|
||||||
In order to make assertions about the relative
|
In order to make assertions about the relative
|
||||||
[consistency](/Logic/General_concepts/Logical_consistency.md) or inconsistency
|
[consistency](Logical_consistency.md) or inconsistency
|
||||||
of a set of propositions we advance arguments. Consider everyday life: if we are
|
of a set of propositions we advance arguments. Consider everyday life: if we are
|
||||||
having an argument with someone, we believe that they are wrong. A more logical
|
having an argument with someone, we believe that they are wrong. A more logical
|
||||||
way to say this is that we believe that their beliefs are inconsistent. In order
|
way to say this is that we believe that their beliefs are inconsistent. In order
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ We also distinguish:
|
||||||
- **atomic components**
|
- **atomic components**
|
||||||
|
|
||||||
These definitions provide a formal specification of the concepts of
|
These definitions provide a formal specification of the concepts of
|
||||||
[atomic and molecular propositions](/Logic/Propositional_logic/Atomic_and_molecular_propositions.md)
|
[atomic and molecular propositions](Atomic_and_molecular_propositions.md)
|
||||||
introduced previously.
|
introduced previously.
|
||||||
|
|
||||||
1. If $P$ is an atomic proposition, $P$ contains no connectives and hence does
|
1. If $P$ is an atomic proposition, $P$ contains no connectives and hence does
|
||||||
|
|
|
||||||
|
|
@ -119,4 +119,4 @@ fi
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: this syntax can also be used to test if a given element exists in an
|
> Note: this syntax can also be used to test if a given element exists in an
|
||||||
> [array](/Programming_Languages/Shell/Lists_and_arrays.md).
|
> [array](Lists_and_arrays.md).
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ tags: [python, testing]
|
||||||
|
|
||||||
Pytest is the most popular testing library for Python. It is not included with
|
Pytest is the most popular testing library for Python. It is not included with
|
||||||
the Python standard library so it must be installed with
|
the Python standard library so it must be installed with
|
||||||
[pip](/Programming_Languages/Python/Concepts/Python_package_management.md).
|
[pip](Python_package_management.md).
|
||||||
While it does not include a declaration library, it is robust enough to handle
|
While it does not include a declaration library, it is robust enough to handle
|
||||||
most scenarios having a rich and expressive set of constructs and decorators
|
most scenarios having a rich and expressive set of constructs and decorators
|
||||||
that let you declare what your tests should do, under what conditions they
|
that let you declare what your tests should do, under what conditions they
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ tags: [systems-programming, memory]
|
||||||
# The Kernel
|
# The Kernel
|
||||||
|
|
||||||
The kernel acts as the primary mediator between the hardware (CPU, memory) and
|
The kernel acts as the primary mediator between the hardware (CPU, memory) and
|
||||||
user [processes](../Programming_Languages/Shell_Scripting/Processes.md). Let's
|
user [processes](Processes.md). Let's
|
||||||
look at each of its responsibilities in greater depth:
|
look at each of its responsibilities in greater depth:
|
||||||
|
|
||||||
- process management
|
- process management
|
||||||
|
|
@ -63,7 +63,7 @@ It has the following jobs to manage:
|
||||||
- Allowing for the use of disk space as auxiliary memory
|
- Allowing for the use of disk space as auxiliary memory
|
||||||
|
|
||||||
> Modern CPUs include a
|
> Modern CPUs include a
|
||||||
> [memory management unit](/Operating_Systems/Virtual_memory_and_the_MMU.md#the-memory-management-unit-mmu)
|
> [memory management unit](Virtual_memory_and_the_MMU.md#the-memory-management-unit-mmu)
|
||||||
> which provides the kernel with **virtual** memory. In this scenario, memory
|
> which provides the kernel with **virtual** memory. In this scenario, memory
|
||||||
> isn't directly accessed by the process instead it works on the assumption that
|
> isn't directly accessed by the process instead it works on the assumption that
|
||||||
> is has access to the entire memory of the machine and this is then translated
|
> is has access to the entire memory of the machine and this is then translated
|
||||||
|
|
@ -100,4 +100,4 @@ Example with a terminal program like `ls`:
|
||||||
## Controlling processes
|
## Controlling processes
|
||||||
|
|
||||||
In Linux we can view, kill, pause and resume processes using
|
In Linux we can view, kill, pause and resume processes using
|
||||||
[ps](../Programming_Languages/Shell_Scripting/Processes.md).
|
[ps](Processes.md).
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ tags: [CPU]
|
||||||
|
|
||||||
## The Little Man Computer
|
## The Little Man Computer
|
||||||
|
|
||||||
The [Little Man Computer](https://peterhigginson.co.uk/lmc/) is a simplified
|
The [Little Man Computer]() is a simplified
|
||||||
computer that works on Von Neuman principles. It has all the CPU components we
|
computer that works on Von Neuman principles. It has all the CPU components we
|
||||||
have detailed above. It is programmed in machine code but for simplicity it uses
|
have detailed above. It is programmed in machine code but for simplicity it uses
|
||||||
the denary rather than the binary number system.
|
the denary rather than the binary number system.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
On the left is the instruction set. Each number constitutes and execution
|
On the left is the instruction set. Each number constitutes and execution
|
||||||
routine and the `xx` stand for the address in RAM that the execution will work
|
routine and the `xx` stand for the address in RAM that the execution will work
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags:
|
||||||
# The `$PATH`
|
# The `$PATH`
|
||||||
|
|
||||||
We know that `$PATH` is an
|
We know that `$PATH` is an
|
||||||
[environment variable](/Programming_Languages/Shell/Environmental_and_shell_variables.md).
|
[environment variable](Environmental_and_shell_variables.md).
|
||||||
This variable keeps track of directories **where executables are found**.
|
This variable keeps track of directories **where executables are found**.
|
||||||
|
|
||||||
Whenever any command is run, the shell looks up the directories contained in the
|
Whenever any command is run, the shell looks up the directories contained in the
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ tags: [propositional-logic]
|
||||||
---
|
---
|
||||||
|
|
||||||
We know that when we construct a
|
We know that when we construct a
|
||||||
[derivation](/Logic/Proofs/Formal_proofs_in_propositional_logic.md#derivation-rules)
|
[derivation](Formal_proofs_in_propositional_logic.md#derivation-rules)
|
||||||
we start from a set of assumptions and then attempt to reach a proposition that
|
we start from a set of assumptions and then attempt to reach a proposition that
|
||||||
is a consequence of the starting assumptions. However it does not always have to
|
is a consequence of the starting assumptions. However it does not always have to
|
||||||
be the case that the starting set contains members. The set can in fact be
|
be the case that the starting set contains members. The set can in fact be
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags: [logic-gates, binary, memory, clock]
|
||||||
# 3-bit Counter
|
# 3-bit Counter
|
||||||
|
|
||||||
To demonstrate the use of
|
To demonstrate the use of
|
||||||
[Flip-Flops](/Electronics_and_Hardware/Digital_circuits/Flip_flops.md) we will
|
[Flip-Flops](Flip_flops.md) we will
|
||||||
create the circuit for a 3-bit counter. This simply counts up from 0 to 7
|
create the circuit for a 3-bit counter. This simply counts up from 0 to 7
|
||||||
because 7 is the maximum decimal number we can create with three bits ($2^3$):
|
because 7 is the maximum decimal number we can create with three bits ($2^3$):
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ because 7 is the maximum decimal number we can create with three bits ($2^3$):
|
||||||
|
|
||||||
The circuit will have three memory components, each representing one bit of the
|
The circuit will have three memory components, each representing one bit of the
|
||||||
3-bit number. When the
|
3-bit number. When the
|
||||||
[clock pulses](/Electronics_and_Hardware/Digital_circuits/Clock_signals.md), the
|
[clock pulses](Clock_signals.md), the
|
||||||
3-bit number increments by one. We need to synchronise the operation with a
|
3-bit number increments by one. We need to synchronise the operation with a
|
||||||
clock because each bit by itself is meaningless, it only gains meaning by the
|
clock because each bit by itself is meaningless, it only gains meaning by the
|
||||||
relation it sustains to the other two bits hence it must be kept in sync with
|
relation it sustains to the other two bits hence it must be kept in sync with
|
||||||
|
|
@ -53,7 +53,7 @@ If we look at the pattern of each flip-flops' output we notice the following:
|
||||||
|
|
||||||
This means that to construct a circuit that displays this behaviour we just have
|
This means that to construct a circuit that displays this behaviour we just have
|
||||||
to use a
|
to use a
|
||||||
[T flip-flop](/Electronics_and_Hardware/Digital_circuits/Flip_flops.md#t-flip-flops)
|
[T flip-flop](Flip_flops.md#t-flip-flops)
|
||||||
since the only state change we need is a single bit toggle three times that
|
since the only state change we need is a single bit toggle three times that
|
||||||
retains its value.
|
retains its value.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ tags: [logic-gates, binary]
|
||||||
# Transistors
|
# Transistors
|
||||||
|
|
||||||
In the discussion of
|
In the discussion of
|
||||||
[digital circuits](/Electronics_and_Hardware/Digital_circuits/Digital_circuits.md)
|
[digital circuits](Digital_circuits.md)
|
||||||
we noted that a digital circuit requires that electrical phenomena be treated as
|
we noted that a digital circuit requires that electrical phenomena be treated as
|
||||||
discrete rather than continuous values. Although a given voltage at a point in
|
discrete rather than continuous values. Although a given voltage at a point in
|
||||||
the circuit can vary widely, in order to represent the binary states of 'on' and
|
the circuit can vary widely, in order to represent the binary states of 'on' and
|
||||||
|
|
@ -47,7 +47,7 @@ needs to be fed into another and there is no way to do this with switches.
|
||||||
Thus instead of switches, modern digital circuits use transistors, a special
|
Thus instead of switches, modern digital circuits use transistors, a special
|
||||||
electrical component that controls the flow of current in the manner of a switch
|
electrical component that controls the flow of current in the manner of a switch
|
||||||
where the 'off' and 'on' states are represented by
|
where the 'off' and 'on' states are represented by
|
||||||
[voltage](/Electronics_and_Hardware/Analogue_circuits/Voltage.md) values within
|
[voltage](Voltage.md) values within
|
||||||
set parameters.
|
set parameters.
|
||||||
|
|
||||||
There are different types of transistors but the simplest for the purposes of
|
There are different types of transistors but the simplest for the purposes of
|
||||||
|
|
@ -93,7 +93,7 @@ where the logical function is represented by the characteristic input and output
|
||||||
voltages.
|
voltages.
|
||||||
|
|
||||||
For example to create an
|
For example to create an
|
||||||
[AND](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#and-gate) gate
|
[AND](Logic_gates.md#and-gate) gate
|
||||||
we would have two voltage inputs going into two transistors that are connected
|
we would have two voltage inputs going into two transistors that are connected
|
||||||
in sequence. The two transistors create a continuous line going from the
|
in sequence. The two transistors create a continuous line going from the
|
||||||
collector of one to the emitter of the other. If either voltage input is low
|
collector of one to the emitter of the other. If either voltage input is low
|
||||||
|
|
@ -103,7 +103,7 @@ broken) and there is no current flowing.
|
||||||

|

|
||||||
|
|
||||||
Below, an
|
Below, an
|
||||||
[OR](/Electronics_and_Hardware/Digital_circuits/Logic_gates.md#or-gate) has been
|
[OR](Logic_gates.md#or-gate) has been
|
||||||
constructed with transistors. If a voltage is applied to the base of either
|
constructed with transistors. If a voltage is applied to the base of either
|
||||||
transistor, the current reaches the V-out terminal.
|
transistor, the current reaches the V-out terminal.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ tags: [propositional-logic]
|
||||||
|
|
||||||
Propositions generated from other (simple) propositions by means of
|
Propositions generated from other (simple) propositions by means of
|
||||||
propositional connectives are
|
propositional connectives are
|
||||||
[compound propositions](/Logic/Propositional_logic/Atomic_and_molecular_propositions.md).
|
[compound propositions](Atomic_and_molecular_propositions.md).
|
||||||
|
|
||||||
We know that
|
We know that
|
||||||
[logically determinant](/Logic/General_concepts/Logical_indeterminacy.md)
|
[logically determinant](Logical_indeterminacy.md)
|
||||||
propositions express a truth value. When simple propositions are joined with a
|
propositions express a truth value. When simple propositions are joined with a
|
||||||
connective to make a compound proposition they also have a truth value. This is
|
connective to make a compound proposition they also have a truth value. This is
|
||||||
determined by the nature of the connective and the truth value of the
|
determined by the nature of the connective and the truth value of the
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ inconsistency in terms of truth trees:
|
||||||
|
|
||||||
The following is a truth tree for the set ${P \lor Q, \sim P }$:
|
The following is a truth tree for the set ${P \lor Q, \sim P }$:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Interpretation
|
### Interpretation
|
||||||
|
|
||||||
|
|
@ -161,7 +161,7 @@ not the right hand side.
|
||||||
The following is a truth tree for the set
|
The following is a truth tree for the set
|
||||||
${A & \sim B, C, \sim A \lor \sim B }$.
|
${A & \sim B, C, \sim A \lor \sim B }$.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Interpretation
|
### Interpretation
|
||||||
|
|
||||||
|
|
@ -201,19 +201,19 @@ of each of the main connectives and these rules rely on logical equivalences
|
||||||
|
|
||||||
### Negated negation decomposition: `~~D`
|
### Negated negation decomposition: `~~D`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Truth passes only if $P$ is true
|
Truth passes only if $P$ is true
|
||||||
|
|
||||||
### Conjunction decomposition: `&D`
|
### Conjunction decomposition: `&D`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Truth passes only $P$ and $Q$ are both true.
|
Truth passes only $P$ and $Q$ are both true.
|
||||||
|
|
||||||
### Negated Conjunction decomposition: `~&D`
|
### Negated Conjunction decomposition: `~&D`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Truth passes if either $\sim P$ or $\sim Q$ is true. This rule is a consequence
|
Truth passes if either $\sim P$ or $\sim Q$ is true. This rule is a consequence
|
||||||
of the equivalence between $\sim (P & Q)$ and $\sim P \lor \sim Q$ , the first
|
of the equivalence between $\sim (P & Q)$ and $\sim P \lor \sim Q$ , the first
|
||||||
|
|
@ -221,13 +221,13 @@ of DeMorgan’s Laws.
|
||||||
|
|
||||||
### Disjunction decomposition: `vD`
|
### Disjunction decomposition: `vD`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Truth passes if either $P$or $Q$ are true.
|
Truth passes if either $P$or $Q$ are true.
|
||||||
|
|
||||||
### Negated Disjunction decomposition: `~vD`
|
### Negated Disjunction decomposition: `~vD`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Truth passes if both $P$ and $Q$ are false. This rule is a consequence of the
|
Truth passes if both $P$ and $Q$ are false. This rule is a consequence of the
|
||||||
equivalence between $\sim (P \lor Q)$ and $\sim P & \sim Q$, the second of
|
equivalence between $\sim (P \lor Q)$ and $\sim P & \sim Q$, the second of
|
||||||
|
|
@ -235,7 +235,7 @@ DeMorgan’s Laws.
|
||||||
|
|
||||||
### Conditional decomposition: `⊃D`
|
### Conditional decomposition: `⊃D`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Truth passes if either $\sim P$ or $Q$ are true. This rule is a consequence of
|
Truth passes if either $\sim P$ or $Q$ are true. This rule is a consequence of
|
||||||
the equivalence between $P \supset Q$ and $\sim P \lor Q$ therefore this branch
|
the equivalence between $P \supset Q$ and $\sim P \lor Q$ therefore this branch
|
||||||
|
|
@ -246,11 +246,11 @@ has the shape of a disjunction with $\sim P$ , $Q$ as its disjuncts.
|
||||||
Truth passes if both $P$ and $\sim Q$ are true. This is a consequence of the
|
Truth passes if both $P$ and $\sim Q$ are true. This is a consequence of the
|
||||||
equivalence between $\sim (P \supset Q)$ and $P & \sim Q$.
|
equivalence between $\sim (P \supset Q)$ and $P & \sim Q$.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Biconditional decomposition: `≡D`
|
### Biconditional decomposition: `≡D`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Truth passes if either $P$ and $Q$ are true or $\sim P & \sim Q$ are true. This
|
Truth passes if either $P$ and $Q$ are true or $\sim P & \sim Q$ are true. This
|
||||||
is an interesting rule because it combines the disjunction and conjunction tree
|
is an interesting rule because it combines the disjunction and conjunction tree
|
||||||
|
|
@ -258,7 +258,7 @@ shapes.
|
||||||
|
|
||||||
### Negated biconditional decomposition: `~≡D`
|
### Negated biconditional decomposition: `~≡D`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Truth passes if either $P$ and $\sim Q$ is true or if $\sim P$ and $Q$ is true.
|
Truth passes if either $P$ and $\sim Q$ is true or if $\sim P$ and $Q$ is true.
|
||||||
|
|
||||||
|
|
@ -279,7 +279,7 @@ following heuristic techniques followed in order, facilitate this:
|
||||||
|
|
||||||
Here are some examples of these rules applied:
|
Here are some examples of these rules applied:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Observe that here we don’t bother to decompose the sentence on line 1. This is
|
Observe that here we don’t bother to decompose the sentence on line 1. This is
|
||||||
because, having decomposed the sentences on lines 2 and 3 we have arrived at a
|
because, having decomposed the sentences on lines 2 and 3 we have arrived at a
|
||||||
|
|
@ -318,7 +318,7 @@ A logically false sentence cannot be true on any assignment. This is the same
|
||||||
thing as an inconsistent set. Thus it will be represented in a truth tree as
|
thing as an inconsistent set. Thus it will be represented in a truth tree as
|
||||||
inconsistency which is disclosed via a closed tree.
|
inconsistency which is disclosed via a closed tree.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Logical truth
|
### Logical truth
|
||||||
|
|
||||||
|
|
@ -367,7 +367,7 @@ equivalent.
|
||||||
> Sentences $P$ and $Q$ are truth-functionally equivalent if and only if the set
|
> Sentences $P$ and $Q$ are truth-functionally equivalent if and only if the set
|
||||||
> $\sim (P \equiv Q)$ has a closed tree
|
> $\sim (P \equiv Q)$ has a closed tree
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Logical entailment and validity
|
### Logical entailment and validity
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ cell of the tape is a head, which can either move left or right, and can read
|
||||||
the symbols written in the cells. The head is also capable of erasing symbols
|
the symbols written in the cells. The head is also capable of erasing symbols
|
||||||
and writing new symbols into the cells.
|
and writing new symbols into the cells.
|
||||||
|
|
||||||
 The direction that the
|
 The direction that the
|
||||||
head moves, which values it erases, and which values it writes in, are dependent
|
head moves, which values it erases, and which values it writes in, are dependent
|
||||||
on a set of instructions provided to the machine.0
|
on a set of instructions provided to the machine.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags:
|
||||||
# Type narrowing and guarding
|
# Type narrowing and guarding
|
||||||
|
|
||||||
Type narrowing is the process of working out from a supertype like
|
Type narrowing is the process of working out from a supertype like
|
||||||
[any](./Any.md) or [unknown](./Unknown.md) whic type the value should be in the
|
[any](Any.md) or [unknown](Unknown.md) whic type the value should be in the
|
||||||
x course of your code. This is necessary since a process will not necessarily
|
x course of your code. This is necessary since a process will not necessarily
|
||||||
always return or involve homogenous types.
|
always return or involve homogenous types.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ There are two methods for updating a document
|
||||||
## Query first document update
|
## Query first document update
|
||||||
|
|
||||||
With this approach we first execute a
|
With this approach we first execute a
|
||||||
[query](/Databases/MongoDB/Querying_a_collection.md) to retrieve the document we
|
[query](Querying_a_collection.md) to retrieve the document we
|
||||||
want to edit and then make the change. We use the `findById` method to identify
|
want to edit and then make the change. We use the `findById` method to identify
|
||||||
the document by its UUID and then `set` to update specified properties on the
|
the document by its UUID and then `set` to update specified properties on the
|
||||||
document. The `set` method is one of many operators that can be used to update
|
document. The `set` method is one of many operators that can be used to update
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ app.listen(8080, () =>
|
||||||
## Add GraphQL as middlewear
|
## Add GraphQL as middlewear
|
||||||
|
|
||||||
Next we introduce GraphQL as a piece of Node.js
|
Next we introduce GraphQL as a piece of Node.js
|
||||||
[middlewear](/Programming_Languages/Node/Architecture/Middleware.md), with the
|
[middlewear](Middleware.md), with the
|
||||||
`app.use()` method.
|
`app.use()` method.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ tags: [graphql]
|
||||||
## Updated schema
|
## Updated schema
|
||||||
|
|
||||||
In order to demonstrate arguments we need to expand the
|
In order to demonstrate arguments we need to expand the
|
||||||
[original schema](/Databases/GraphQL/Apollo/Apollo_Server.md#example-schema).
|
[original schema](Apollo_Server.md#example-schema).
|
||||||
|
|
||||||
Remember a Track is a group of modules that teaches about a specific topic. We
|
Remember a Track is a group of modules that teaches about a specific topic. We
|
||||||
are going to add:
|
are going to add:
|
||||||
|
|
@ -82,7 +82,7 @@ If we have more than one argument we can separate them with commas.
|
||||||
## Create resolver for new query
|
## Create resolver for new query
|
||||||
|
|
||||||
Now we have to create a resolver for our new `track` query. We will quickly run
|
Now we have to create a resolver for our new `track` query. We will quickly run
|
||||||
through the [server-side process](/Databases/GraphQL/Apollo/Apollo_Server.md).
|
through the [server-side process](Apollo_Server.md).
|
||||||
|
|
||||||
### Update our `RESTDataSource`
|
### Update our `RESTDataSource`
|
||||||
|
|
||||||
|
|
@ -266,7 +266,7 @@ return a specific track.
|
||||||
## Send query with arguments using Apollo `useQuery`
|
## Send query with arguments using Apollo `useQuery`
|
||||||
|
|
||||||
We can now write a proper query using the
|
We can now write a proper query using the
|
||||||
[useQuery hook](/Databases/GraphQL/Apollo/Apollo_Client.md#usequery-hook) from
|
[useQuery hook](Apollo_Client.md#usequery-hook) from
|
||||||
Apollo Client, with variables.
|
Apollo Client, with variables.
|
||||||
|
|
||||||
First define our query constant:
|
First define our query constant:
|
||||||
|
|
@ -304,6 +304,6 @@ const { loading, error, data } = useQuery(GET_TRACK, {
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that in contrast to the
|
Note that in contrast to the
|
||||||
[simple example](/Databases/GraphQL/Apollo/Apollo_Client.md#query-constants)
|
[simple example](Apollo_Client.md#query-constants)
|
||||||
because we are using variables, we have to pass-in an additional options object
|
because we are using variables, we have to pass-in an additional options object
|
||||||
with the query constant that specifies our variables.
|
with the query constant that specifies our variables.
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ the property of `required` for a cell in the table. If we didn't set any
|
||||||
validation via Mongoose, Mongo would accept whatever we sent to it.
|
validation via Mongoose, Mongo would accept whatever we sent to it.
|
||||||
|
|
||||||
What is the relationship between this Mongoose validation and the
|
What is the relationship between this Mongoose validation and the
|
||||||
[Joi](/Programming_Languages/NodeJS/REST_APIs/Validation.md) validation that we
|
[Joi](Validation.md) validation that we
|
||||||
use when validating API requests in Node/Express? They complement each other. We
|
use when validating API requests in Node/Express? They complement each other. We
|
||||||
use Joi to validate the client request to the API. If this is valid, the process
|
use Joi to validate the client request to the API. If this is valid, the process
|
||||||
would then move onto the next stage which would be transforming the data from a
|
would then move onto the next stage which would be transforming the data from a
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ validate the data that we receive from any HTTP requests where the client sends
|
||||||
a body to the endpoint.
|
a body to the endpoint.
|
||||||
|
|
||||||
One of the most popular schema validators for NodeJS is
|
One of the most popular schema validators for NodeJS is
|
||||||
[joi](https://www.npmjs.com/package/joi).
|
[joi](joi).
|
||||||
|
|
||||||
## Demonstration
|
## Demonstration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,4 +72,4 @@ processes on hold.
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
[Virtual memory](https://www.cs.uic.edu/~jbell/CourseNotes/OperatingSystems/9_VirtualMemory.html#:~:text=Virtual%20memory%20also%20allows%20the,to%20more%20than%20one%20process)
|
[Virtual memory](9_VirtualMemory.html#:~:text=Virtual%20memory%20also%20allows%20the,to%20more%20than%20one%20process)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags: [physics, electricity]
|
||||||
## Difference of potential and the tranfer of energy
|
## Difference of potential and the tranfer of energy
|
||||||
|
|
||||||
We noted in the discussion of
|
We noted in the discussion of
|
||||||
[current](/Electronics_and_Hardware/Analogue_circuits/Current.md) that current
|
[current](Current.md) that current
|
||||||
flows when there is a difference of potential between two points with negatively
|
flows when there is a difference of potential between two points with negatively
|
||||||
charged atoms at one point and positively charged atoms at the other.
|
charged atoms at one point and positively charged atoms at the other.
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ current, energy must be imparted to the electrons so that they all flow in the
|
||||||
same direction.
|
same direction.
|
||||||
|
|
||||||
Voltage is the application of this energy. Any
|
Voltage is the application of this energy. Any
|
||||||
[form of energy](/Electronics_and_Hardware/Analogue_circuits/Voltage_sources.md)
|
[form of energy](Voltage_sources.md)
|
||||||
that dislodges electrons from atoms can be used to produce current. Thus:
|
that dislodges electrons from atoms can be used to produce current. Thus:
|
||||||
|
|
||||||
> Voltage is the work required per coulomb to move a charge from one point to
|
> Voltage is the work required per coulomb to move a charge from one point to
|
||||||
|
|
@ -31,7 +31,7 @@ that dislodges electrons from atoms can be used to produce current. Thus:
|
||||||
|
|
||||||
Given that voltage is the force that generates current, it would be natural to
|
Given that voltage is the force that generates current, it would be natural to
|
||||||
think that voltage only exists when a voltage source (such as a
|
think that voltage only exists when a voltage source (such as a
|
||||||
[battery](/Electronics_and_Hardware/Analogue_circuits/Cells_and_batteries.md))
|
[battery](Cells_and_batteries.md))
|
||||||
is connected to a circuit. This however is not the case. Even if a 9V battery
|
is connected to a circuit. This however is not the case. Even if a 9V battery
|
||||||
isn't connected to anything it still has a difference of potential of 9-volts
|
isn't connected to anything it still has a difference of potential of 9-volts
|
||||||
accross its terminals. Remember voltage is _potential energy_ not just the
|
accross its terminals. Remember voltage is _potential energy_ not just the
|
||||||
|
|
@ -98,7 +98,7 @@ obvious enough: they are at the beginning and end of the loop so are equal to
|
||||||
the maximal voltage rise and minimal voltage drop, respectively.
|
the maximal voltage rise and minimal voltage drop, respectively.
|
||||||
|
|
||||||
We can work out the voltage of the remaining voltage points by inverting
|
We can work out the voltage of the remaining voltage points by inverting
|
||||||
[Ohm's Law](/Electronics_and_Hardware/Physics_of_electricity/Ohms_Law.md):
|
[Ohm's Law](Ohms_Law.md):
|
||||||
$V = I \times R$:
|
$V = I \times R$:
|
||||||
|
|
||||||
For the voltage at $V^{B}$:
|
For the voltage at $V^{B}$:
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ or **alternating current** (AC):
|
||||||
### Chemicals (cells and batteries)
|
### Chemicals (cells and batteries)
|
||||||
|
|
||||||
The chemical creation of current is the physics behind
|
The chemical creation of current is the physics behind
|
||||||
[batteries](/Electronics_and_Hardware/Analogue_circuits/Cells_and_batteries.md).
|
[batteries](Cells_and_batteries.md).
|
||||||
Chemical current production produces currents on a smaller and less industrial
|
Chemical current production produces currents on a smaller and less industrial
|
||||||
scale than generators.
|
scale than generators.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ tags:
|
||||||
|
|
||||||
# What are disks?
|
# What are disks?
|
||||||
|
|
||||||
A disk is a mass storage [block_device](/Operating_Systems/Devices.md) which we
|
A disk is a mass storage [block_device](Devices.md) which we
|
||||||
can write to and read from.
|
can write to and read from.
|
||||||
|
|
||||||
## SCSI
|
## SCSI
|
||||||
|
|
@ -24,12 +24,12 @@ The following diagram represents the basic anatomy of a disk device.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
- A disk is divided up into [partitions](/Operating_Systems/Disks/Partitions.md)
|
- A disk is divided up into [partitions](Partitions.md)
|
||||||
which are subsections of the overall disk. The kernel presents each partition
|
which are subsections of the overall disk. The kernel presents each partition
|
||||||
as a [block device](/Operating_Systems/Devices.md) as it would with an entire
|
as a [block device](Devices.md) as it would with an entire
|
||||||
disk.
|
disk.
|
||||||
- The disk dedicates a small part of its contents to a **partition table**: this
|
- The disk dedicates a small part of its contents to a **partition table**: this
|
||||||
defines the different partitions that comprise the total disk space.
|
defines the different partitions that comprise the total disk space.
|
||||||
- The **filesystem** is a database of files and directories: this comprises the
|
- The **filesystem** is a database of files and directories: this comprises the
|
||||||
bulk of the partition and is what you interact with in
|
bulk of the partition and is what you interact with in
|
||||||
[user space](/Operating_Systems/User_Space.md) when reading and writing data.
|
[user space](User_Space.md) when reading and writing data.
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@ $$ a + b = b + a $$
|
||||||
### Multiplication
|
### Multiplication
|
||||||
|
|
||||||
When **multiplying** whole numbers the placement of the
|
When **multiplying** whole numbers the placement of the
|
||||||
[multiplicands](https://www.notion.so/Symbols-and-formal-conventions-80aeaf1872f94a0d97a2e8d07e3855bd)
|
[multiplicands](Symbols-and-formal-conventions-80aeaf1872f94a0d97a2e8d07e3855bd)
|
||||||
does not affect the
|
does not affect the
|
||||||
[product](https://www.notion.so/Symbols-and-formal-conventions-80aeaf1872f94a0d97a2e8d07e3855bd).
|
[product](Symbols-and-formal-conventions-80aeaf1872f94a0d97a2e8d07e3855bd).
|
||||||
|
|
||||||
Let **a, b** represent whole numbers, then:
|
Let **a, b** represent whole numbers, then:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ to represent two states: on (1) and off (0) which corresponds to the switch on
|
||||||
an electrical circuit. A single circuit representing the binary values of 1 and
|
an electrical circuit. A single circuit representing the binary values of 1 and
|
||||||
0:
|
0:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
It would be much more complicated to have to represent ten different states
|
It would be much more complicated to have to represent ten different states
|
||||||
under the decimal number system, although denary computers do exist.
|
under the decimal number system, although denary computers do exist.
|
||||||
|
|
@ -27,7 +27,7 @@ represent as large a binary number as we need. We just need one switch for every
|
||||||
digit we want to represent. The switches used in modern computers are so cheap
|
digit we want to represent. The switches used in modern computers are so cheap
|
||||||
and so small that billions can be fitted on a single circuit board.
|
and so small that billions can be fitted on a single circuit board.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
When we use the term 'switch' we actually mean the transistor components of a
|
When we use the term 'switch' we actually mean the transistor components of a
|
||||||
circuit. We don't need to know the physical details at this level but we can say
|
circuit. We don't need to know the physical details at this level but we can say
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ echo $a
|
||||||
> Note: we do not use a dollar-sign when referring to variables within
|
> Note: we do not use a dollar-sign when referring to variables within
|
||||||
> arithmetic evaluation, there is no need. If we do, we get an error. This is
|
> arithmetic evaluation, there is no need. If we do, we get an error. This is
|
||||||
> because we are using an
|
> because we are using an
|
||||||
> [expansion](/Programming_Languages/Shell/Expansions_and_substitutions.md),
|
> [expansion](Expansions_and_substitutions.md),
|
||||||
> therefore the variables are already being interpreted as variables.
|
> therefore the variables are already being interpreted as variables.
|
||||||
|
|
||||||
## Declaring variables as integers
|
## Declaring variables as integers
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ event. At bottom everything in Node is an event with a callback, created via
|
||||||
event emitters.
|
event emitters.
|
||||||
|
|
||||||
Because Node's runtime is
|
Because Node's runtime is
|
||||||
[event-driven](/Programming_Languages/NodeJS/Architecture/Event_loop.md), it is
|
[event-driven](Event_loop.md), it is
|
||||||
event-emitter cycles that are being processed by the Event Loop, although you
|
event-emitter cycles that are being processed by the Event Loop, although you
|
||||||
may know them as `fs` or `http` (etc) events. The call stack that the Event Loop
|
may know them as `fs` or `http` (etc) events. The call stack that the Event Loop
|
||||||
works through is just a series of event emissions and their associated
|
works through is just a series of event emissions and their associated
|
||||||
|
|
|
||||||
4
zk/fs.md
|
|
@ -13,7 +13,7 @@ methods for working with files and directories.
|
||||||
|
|
||||||
Every method associated with `fs` has a _blocking_ and _asynchronous_
|
Every method associated with `fs` has a _blocking_ and _asynchronous_
|
||||||
implementation. The former obviously blocks the
|
implementation. The former obviously blocks the
|
||||||
[event queue](/Programming_Languages/NodeJS/Architecture/Event_loop.md), the
|
[event queue](Event_loop.md), the
|
||||||
latter does not.
|
latter does not.
|
||||||
|
|
||||||
The synchronous methods are useful to have in some contexts but in general and
|
The synchronous methods are useful to have in some contexts but in general and
|
||||||
|
|
@ -100,4 +100,4 @@ fs.rmSync("/dir", { recursive: true, force: true });
|
||||||
|
|
||||||
## Streams
|
## Streams
|
||||||
|
|
||||||
See [Handling streams with fs](/Programming_Languages/NodeJS/Streams.md)
|
See [Handling streams with fs](Streams.md)
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ JavaScript.
|
||||||
## Creating a server
|
## Creating a server
|
||||||
|
|
||||||
An HTTP server is another instance of an
|
An HTTP server is another instance of an
|
||||||
[event emitter](/Programming_Languages/NodeJS/Modules/Core/events.md)). It
|
[event emitter](events.md)). It
|
||||||
therefore has all the same methods as the `EventEmitter` class: `on`, `emit`,
|
therefore has all the same methods as the `EventEmitter` class: `on`, `emit`,
|
||||||
`addListener` etc. This demonstrates again how much of Node's core functionality
|
`addListener` etc. This demonstrates again how much of Node's core functionality
|
||||||
is based on event emitters.
|
is based on event emitters.
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,9 @@ tags: [systems-programming]
|
||||||
|
|
||||||
# `journald`
|
# `journald`
|
||||||
|
|
||||||
`journald` is a program that comes as default with [systemd](/Linux/systemd.md).
|
`journald` is a program that comes as default with [systemd](systemd.md).
|
||||||
It is a service fror collecting and storing system-level log data. I keeps a
|
It is a service fror collecting and storing system-level log data. I keeps a
|
||||||
track of all [kernel](/Operating_Systems/The_Kernel.md) processes. It is
|
track of all [kernel](The_Kernel.md) processes. It is
|
||||||
invaluable when tracing the source of problems and errors that may arise on the
|
invaluable when tracing the source of problems and errors that may arise on the
|
||||||
system level. It keeps a track of all kernal processes.
|
system level. It keeps a track of all kernal processes.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ the terminal and exit the current process.
|
||||||
## Managing runtime environments
|
## Managing runtime environments
|
||||||
|
|
||||||
See
|
See
|
||||||
[Managing Environments](/Programming_Languages/NodeJS/Architecture/Managing_environments.md).
|
[Managing Environments](Managing_environments.md).
|
||||||
|
|
||||||
## Accessing arguments: `process.argv`
|
## Accessing arguments: `process.argv`
|
||||||
|
|
||||||
|
|
@ -101,7 +101,7 @@ Hello from file
|
||||||
|
|
||||||
Typically we want to write and read data that the user provides. To do this we
|
Typically we want to write and read data that the user provides. To do this we
|
||||||
need to wait on that event. So we use Node's asynchonous
|
need to wait on that event. So we use Node's asynchonous
|
||||||
[event listeners](/Programming_Languages/NodeJS/Modules/Core/events.md). We wait
|
[event listeners](events.md). We wait
|
||||||
on the `data` event:
|
on the `data` event:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,10 @@ tags: [systems-programming]
|
||||||
|
|
||||||
# systemd
|
# systemd
|
||||||
|
|
||||||
Once the [boot process](/Operating_Systems/Boot_process.md) has completed and
|
Once the [boot process](Boot_process.md) has completed and
|
||||||
the bootloader has located the kernel and injected it into memory the first user
|
the bootloader has located the kernel and injected it into memory the first user
|
||||||
space program runs: `init` (for _initialisation_). `init` is a
|
space program runs: `init` (for _initialisation_). `init` is a
|
||||||
[daemon](/Operating_Systems/Daemons.md) process that continues running until
|
[daemon](Daemons.md) process that continues running until
|
||||||
shutdown and is responsible for starting all the processes that are
|
shutdown and is responsible for starting all the processes that are
|
||||||
prerequisites for user space. For example: network connections, disk access,
|
prerequisites for user space. For example: network connections, disk access,
|
||||||
user logins etc.
|
user logins etc.
|
||||||
|
|
|
||||||
|
|
@ -126,4 +126,4 @@ Then, in our code we just insert the `Context` component:
|
||||||
In the examples above we have only been consuming state that is owned by the
|
In the examples above we have only been consuming state that is owned by the
|
||||||
provider however in most scenarios you will also want to update the state from a
|
provider however in most scenarios you will also want to update the state from a
|
||||||
consumer. This is best achieved by combining `useContext` with a reducer and is
|
consumer. This is best achieved by combining `useContext` with a reducer and is
|
||||||
detailed in [Application state management](./Application_state_management.md).
|
detailed in [Application state management](Application_state_management.md).
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ would be dispatching a request to an API to retrieve data to display in a
|
||||||
component's initial render.
|
component's initial render.
|
||||||
|
|
||||||
`useEffect` enshrines but also simplifies the
|
`useEffect` enshrines but also simplifies the
|
||||||
[lifecyle methods](./../Classes/Lifecycle_methods.md) that are used with
|
[lifecyle methods](Lifecycle_methods.md) that are used with
|
||||||
class-based React components.
|
class-based React components.
|
||||||
|
|
||||||
## Demonstration
|
## Demonstration
|
||||||
|
|
@ -78,12 +78,12 @@ Note the array that is the second argument to `useEffect`. This is the
|
||||||
|
|
||||||
The syntax of the `useEffect` hook also allows you to handle cleanup: something
|
The syntax of the `useEffect` hook also allows you to handle cleanup: something
|
||||||
you want to do when the component unmounts (another example of how this hook
|
you want to do when the component unmounts (another example of how this hook
|
||||||
recasts the traditional [lifecycle methods](./../Classes/Lifecycle_methods.md))
|
recasts the traditional [lifecycle methods](Lifecycle_methods.md))
|
||||||
. In addition to running on unmount, the cleanup function will run before the
|
. In addition to running on unmount, the cleanup function will run before the
|
||||||
effect runs again (i.e. when it runs in response to a change in one of the
|
effect runs again (i.e. when it runs in response to a change in one of the
|
||||||
elements of the dependency araray). This is chiefly used to prevent
|
elements of the dependency araray). This is chiefly used to prevent
|
||||||
[memory leaks](../../../Software_Engineering/Memory_leaks.md) and the
|
[memory leaks](Memory_leaks.md) and the
|
||||||
['update on unmounted component error'](../Errors.md#state-update-on-unmounted-component).
|
['update on unmounted component error'](Errors.md#state-update-on-unmounted-component).
|
||||||
|
|
||||||
You do this by having a `return` clause after the main effect. Schematically:
|
You do this by having a `return` clause after the main effect. Schematically:
|
||||||
|
|
||||||
|
|
@ -114,4 +114,4 @@ useEffect(() => {
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
[Understanding the React useEffect cleanup function](https://blog.logrocket.com/understanding-react-useeffect-cleanup-function/)
|
[Understanding the React useEffect cleanup function]()
|
||||||
|
|
|
||||||