fixed media URLs, changed plyr config

This commit is contained in:
Lynne Megido 2020-04-12 16:55:42 +10:00
parent 31794b6e31
commit cecba67fc2
7 changed files with 14 additions and 12 deletions

View file

@ -19,7 +19,8 @@ layout: default
{%- endfor %} <br> {%- endfor %} <br>
</div> </div>
<div class='post-excerpt'> <div class='post-excerpt'>
<p>{{ post.summary | default: post.excerpt }}</p> {%- assign excerpt_smol = post.excerpt | summarise %}
<p>{{ post.summary | default: excerpt_smol }}</p>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}

View file

@ -27,9 +27,9 @@ in such a system, 1111 would be 7 instead of 15, just as 1000 is 0 instead of 8.
overflow and underflow bugs are the root of many software issues, ranging from fascinating to dangerous. in the first game in sid meier's civilization series, ghandi had an aggressiveness score of 1, the lowest possible. certain political actions reduced that score by 2, which caused it to underflow and become 255 instead - far beyond the intended maximum - which gave him a very strong tendency to use nuclear weaponry. this bug was so well-known and accidentally hilarious that the company decided to intentionally make ghandi have a strong affinity for nukes in almost all the following games. some arcade games relied on the level number to generate the level, and broke when the number went above what it was expecting. (the reason behind the pac-man "kill screen" is particularly interesting!) for a more serious and worrying example of integer overflow, see this article: <https://en.wikipedia.org/wiki/Year_2038_problem> (unlike Y2K, this one is an actual issue, and has already caused numerous problems) overflow and underflow bugs are the root of many software issues, ranging from fascinating to dangerous. in the first game in sid meier's civilization series, ghandi had an aggressiveness score of 1, the lowest possible. certain political actions reduced that score by 2, which caused it to underflow and become 255 instead - far beyond the intended maximum - which gave him a very strong tendency to use nuclear weaponry. this bug was so well-known and accidentally hilarious that the company decided to intentionally make ghandi have a strong affinity for nukes in almost all the following games. some arcade games relied on the level number to generate the level, and broke when the number went above what it was expecting. (the reason behind the pac-man "kill screen" is particularly interesting!) for a more serious and worrying example of integer overflow, see this article: <https://en.wikipedia.org/wiki/Year_2038_problem> (unlike Y2K, this one is an actual issue, and has already caused numerous problems)
- ![](https://bune.city/wp-content/uploads/2019/05/53b44b9f1dc14e14-498x1024.png){.wp-image-55} - ![](https://cdn.bune.city/2019/05/53b44b9f1dc14e14-498x1024.png){.wp-image-55}
- ![](https://bune.city/wp-content/uploads/2019/05/c4a912e5c01551db.jpg){.wp-image-56} - ![](https://cdn.bune.city/2019/05/c4a912e5c01551db.jpg){.wp-image-56}
the first image is a chart explaining two methods of representing negative numbers with four bits (the one used in this post is on the left). the second is a real-world example of an "overflow". the first image is a chart explaining two methods of representing negative numbers with four bits (the one used in this post is on the left). the second is a real-world example of an "overflow".

View file

@ -27,7 +27,7 @@ there are benefits to all three types of formats. lossily compressed files are m
as an example of how dramatic these differences often are, i looked at the file sizes for the downloadable version of master boot record's album "internet protocol" in three formats: WAV, FLAC, and MP3. as an example of how dramatic these differences often are, i looked at the file sizes for the downloadable version of master boot record's album "internet protocol" in three formats: WAV, FLAC, and MP3.
![](https://bune.city/wp-content/uploads/2019/05/sizes-1024x742.png){.wp-image-45} ![](https://cdn.bune.city/2019/05/sizes-1024x742.png){.wp-image-45}
you can see that the file size (shown in megabytes) is nearly 90 megabytes smaller with the FLAC version, and the MP3 version is only \~13% of the size of the WAV version. note that these downloads are in ZIP format - the WAV files would be even larger than shown here. this is not representative of all compression algorithms, nor is it representative of all music - this is just an illustrative example. TV static in particular compresses very poorly, because it's so random, which makes it hard for algorithms to find patterns. watch a youtube video of TV static to see this in effect - you'll notice obvious "block" shapes and blurriness that shouldn't be there as the algorithm struggles to do its job. the compression on youtube is particularly strong to ensure that the servers can keep up with the enormous demand, but not so much so that videos become blurry, unwatchable messes. you can see that the file size (shown in megabytes) is nearly 90 megabytes smaller with the FLAC version, and the MP3 version is only \~13% of the size of the WAV version. note that these downloads are in ZIP format - the WAV files would be even larger than shown here. this is not representative of all compression algorithms, nor is it representative of all music - this is just an illustrative example. TV static in particular compresses very poorly, because it's so random, which makes it hard for algorithms to find patterns. watch a youtube video of TV static to see this in effect - you'll notice obvious "block" shapes and blurriness that shouldn't be there as the algorithm struggles to do its job. the compression on youtube is particularly strong to ensure that the servers can keep up with the enormous demand, but not so much so that videos become blurry, unwatchable messes.

View file

@ -12,7 +12,7 @@ You've probably seen a HTTPS error before. This happens when a site's certificat
<!--more--> <!--more-->
HTTPS certificates are only valid for a certain amount of time. When that time runs out, they need to be renewed. This is done to ensure that the person with the certificate is still running the website, and is still interested in keeping the certificate. HTTPS certificates are only valid for a certain amount of time. When that time runs out, they need to be renewed. This is done to ensure that the person with the certificate is still running the website, and is still interested in keeping the certificate.
![The expiration date of the certificate for this site, as of the time of writing.](https://bune.city/wp-content/uploads/2019/05/cert.png){.wp-image-142} ![The expiration date of the certificate for this site, as of the time of writing.](https://cdn.bune.city/2019/05/cert.png){.wp-image-142}
When a certificate expires, your browser will refuse to connect to the website. A similar issue happened with Firefox - their own add-on signing certificate expired on the 4th of May, 00:09 UTC, [causing everyone's add-ons to be disabled](https://support.mozilla.org/en-US/kb/add-ons-disabled-or-fail-to-install-firefox) after that timed passed. When a certificate expires, your browser will refuse to connect to the website. A similar issue happened with Firefox - their own add-on signing certificate expired on the 4th of May, 00:09 UTC, [causing everyone's add-ons to be disabled](https://support.mozilla.org/en-US/kb/add-ons-disabled-or-fail-to-install-firefox) after that timed passed.

View file

@ -17,25 +17,25 @@ The letters
At first, there really was only one USB port type. At first, there really was only one USB port type.
![This one!](https://bune.city/wp-content/uploads/2019/05/1920px-USB_Type-A_receptacle.svg_.png){.wp-image-202} ![This one!](https://cdn.bune.city/2019/05/1920px-USB_Type-A_receptacle.svg_.png){.wp-image-202}
When people describe a port as a "USB port" without any additional info, they're talking about this one. USB-A ports can be found everywhere, and are (as of writing) still more common than USB-C. When people describe a port as a "USB port" without any additional info, they're talking about this one. USB-A ports can be found everywhere, and are (as of writing) still more common than USB-C.
If this is USB-A, and we're up to USB-C, then where's USB-B? You might have used one without knowing. If this is USB-A, and we're up to USB-C, then where's USB-B? You might have used one without knowing.
![A USB-B port](https://bune.city/wp-content/uploads/2019/05/850px-USB_Type-B_receptacle.svg_.png){.wp-image-203} ![A USB-B port](https://cdn.bune.city/2019/05/850px-USB_Type-B_receptacle.svg_.png){.wp-image-203}
USB-B cables are often referred to as "printer cables", as they are most commonly used on printers. USB-B cables are often referred to as "printer cables", as they are most commonly used on printers.
![This USB-A to USB-B cable from Officeworks is described as a "printer cable", and is sold under the "printer cables" category.](https://bune.city/wp-content/uploads/2019/05/Screenshot_20190517-021443_Firefox.png){.wp-image-204} ![This USB-A to USB-B cable from Officeworks is described as a "printer cable", and is sold under the "printer cables" category.](https://cdn.bune.city/2019/05/Screenshot_20190517-021443_Firefox.png){.wp-image-204}
A more commonly seen port is USB Micro-B, which was used on most Android smartphones, before manufacturers adopted USB-C. A more commonly seen port is USB Micro-B, which was used on most Android smartphones, before manufacturers adopted USB-C.
![](https://bune.city/wp-content/uploads/2019/05/1280px-USB_Micro-B.svg_.png){.wp-image-205} ![](https://cdn.bune.city/2019/05/1280px-USB_Micro-B.svg_.png){.wp-image-205}
There are [many more varieties of USB](https://en.wikipedia.org/wiki/USB#Receptacle_(socket)_identification), such as USB Mini-A, USB SuperSpeed B, and, of course, USB-C. There are [many more varieties of USB](https://en.wikipedia.org/wiki/USB#Receptacle_(socket)_identification), such as USB Mini-A, USB SuperSpeed B, and, of course, USB-C.
![A USB-C port.](https://bune.city/wp-content/uploads/2019/05/1920px-USB_Type-C_icon.svg_.png){.wp-image-207} ![A USB-C port.](https://cdn.bune.city/2019/05/1920px-USB_Type-C_icon.svg_.png){.wp-image-207}
The numbers The numbers
----------- -----------

View file

@ -1,7 +1,7 @@
--- ---
title: "Ask your own Lynne Teaches Tech question!" title: "Ask your own Lynne Teaches Tech question!"
author: Lynne author: Lynne
categories: [Announcements] categories: [Lynne Teaches Tech, Announcements]
--- ---
If you've always wanted to see your own question answered by a [Lynne Teaches Tech](https://bune.city/tag/lynne-teaches-tech) post, there's now an easy survey to fill out to submit a question! If you've always wanted to see your own question answered by a [Lynne Teaches Tech](https://bune.city/tag/lynne-teaches-tech) post, there's now an easy survey to fill out to submit a question!

View file

@ -7,6 +7,7 @@ document.addEventListener('DOMContentLoaded', (event) => {
players = Array.from(dgcn('plyr')).map(p => new Plyr(p, { players = Array.from(dgcn('plyr')).map(p => new Plyr(p, {
iconUrl: '/assets/plyr/plyr.svg', iconUrl: '/assets/plyr/plyr.svg',
controls: ['play-large', 'play', 'current-time', 'progress', 'download', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen'], controls: ['play-large', 'play', 'current-time', 'progress', 'download', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen'],
invertTime: false,
quality: { quality: {
default: p.dataset.default, default: p.dataset.default,
options: [4320, 2880, 2160, 1440, 1080, 720, 576, 506, 480, 360, 240] options: [4320, 2880, 2160, 1440, 1080, 720, 576, 506, 480, 360, 240]