feed.rss
XML 1.0 document, Unicode text, UTF-8 text, with very long lines (945)
1<?xml version="1.0" encoding="UTF-8" ?> 2<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" > 3 4<channel> 5<atom:link href="https://steve0greatness.github.io/blog/feed.rss" rel="self" type="application/rss+xml" /> 6<title>Steve0Greatness' Blog</title> 7<link>https://steve0greatness.github.io/</link> 8<description>A blog by a human being.</description> 9<language>en-us</language> 10<generator>Custom w/Jinja</generator> 11<image> 12<link>https://steve0greatness.github.io/</link> 13<title>Steve0Greatness' Blog</title> 14<url>https://steve0greatness.github.io/RSS-Img.png</url> 15<description>A blog by a human being.</description> 16<height>144</height> 17<width>120</width> 18</image> 19 20<item> 21<title>About my Username</title> 22<link>https://steve0greatness.github.io/blog/name.html</link> 23<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/name.txt" /> 24<description> 25<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/name.html">read this article online</a>.</p> 26<p>There's a lot of information about my username. So I thought I'd make this blog post to explain basically everything about it.</p> 27 28<h2 id="pronounciation">Pronounciation</h2> 29 30<p>The pronounciation is Steve (/stiːv/) Zero (/ˈzɪərəʊ/, /ˈzɪroʊ/, or /ˈziroʊ/) Greatness (/ˈɡɹeɪtnəs/). </p> 31 32<p><audio controls="true"> 33<source src="/blog-files/Steve0Greatness-Pronounciation.oga" type="audio/ogg" /> 34Oh no! Your browser does not support audio controls. Maybe try <a href="/blog-files/Steve0Greatness-Pronounciation.oga">downloading the audio file</a>? 35</audio></p> 36 37<p>The above audio file was generated with <a href="https://github.com/espeak-ng/espeak-ng/">eSpeak</a>.</p> 38 39<h2 id="history">History</h2> 40 41<p>Fun fact: when it was still I around, I was fairly active on <a href="https://blocksworld.com/">Blocksworld</a>. If you don't know: Blocksworld is a sandbox, similar to <a href="https://scratch.mit.edu/">Scratch</a>, but in 3D.</p> 42 43<p>On Blocksworld, I went by the username <em>Steve's Greatness</em>. This name was because I really liked Minecraft(hence the Steve) and the Greatness... is because I really liked Minecraft, and I thought it was great.</p> 44 45<p>Eventually, when signing up for Scratch, to my dismay they didn't allow apostrophes or spaces. As a result: I decided to use a 0 inplace of the "'s ", hence the name: <em>Steve0Greatness</em>.</p> 46 47<p>You can still see remnants of this name original name: my <a href="https://replit.com/@StevesGreatness">Replit username is <em>StevesGreatness</em></a>; and in 2020 I had made <a href="https://scratch.mit.edu/users/Steves_greatness">a new Scratch account</a>, with intentions of moving there.</p> 48 49</description> 50<guid isPermaLink="false">name.html</guid> 51<pubDate>Wed, 13 Mar 2024 00:00:00 GMT</pubDate> 52<atom:published>2024-03-13T00:00:00Z</atom:published> 53<atom:updated>2024-03-13T00:00:00Z</atom:updated> 54</item> 55 56<item> 57<title>My HTML Tag Ranking</title> 58<link>https://steve0greatness.github.io/blog/html-tag-ranking.html</link> 59<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/html-tag-ranking.txt" /> 60<description> 61<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/html-tag-ranking.html">read this article online</a>.</p> 62<p>I like HTML. I recently found a video of <a href="t3.gg">Theo</a> ranking HTML tags with a tierlist, the video is available on YouTube(<a href="https://youtu.be/EtYtYnhxeNc">URL</a>), and the tierlist is on TierMaker(<a href="https://tiermaker.com/create/html-elements-16095055">URL</a>). Without further ado, here is how I ranked all* HTML elements.</p> 63 64<p><img src="/blog-files/HTML_tierlist.png" style="width: 97%; height: auto" alt="S: h1, html, ul, link, details, summary, form, title, kbd, a, main, p, b, head, body, img, meta, br, footer, label, input; A: track, blockquote, q, h2, h3, hr svg, tfoot, i, u, textarea, style, code, tbody, optgroup, th, tr, option, select, pre, datalist, s, nav, td, em, iframe, embed, video, dialog, button, mark, ol, noscript, table, article, header, col, field, figcaption, samp, thead, area, colgroup; B: sup, progress, sub, h4, cite, strong, strike, picture, audio, h5, source, h6, canvas, abbr, script, caption; C: figure, math, wbr, hgroup, section, div, small, center, span, template; D: data, object, slot, marquee" /></p> 65 66</description> 67<guid isPermaLink="false">html-tag-ranking.html</guid> 68<pubDate>Wed, 14 Feb 2024 00:00:00 GMT</pubDate> 69<atom:published>2024-02-14T00:00:00Z</atom:published> 70<atom:updated>2024-02-21T00:00:00Z</atom:updated> 71</item> 72 73<item> 74<title>My blog is now in one place</title> 75<link>https://steve0greatness.github.io/blog/singular-blog.html</link> 76<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/singular-blog.txt" /> 77<description> 78<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/singular-blog.html">read this article online</a>.</p> 79<p>Alright, I've now moved all my full blog posts over to this one website. There might be other I miss in other places, but I'll add them here soon. I will not be moving over my micro-blogs, however. Those are too small, and I'd rather keep those separated anyway.</p> 80 81<p>I'm not a fan of how I wrote before December of 2022, everything there is filled with spelling mistakes and grammar issues, I also think most of it was rude towards the reader, which is not a good impression.</p> 82 83</description> 84<guid isPermaLink="false">singular-blog.html</guid> 85<pubDate>Mon, 01 Jan 2024 00:00:00 GMT</pubDate> 86<atom:published>2024-01-01T00:00:00Z</atom:published> 87<atom:updated>2024-01-01T00:00:00Z</atom:updated> 88</item> 89 90<item> 91<title>How to Store a Passwords</title> 92<link>https://steve0greatness.github.io/blog/How-to-Store-Passwords.html</link> 93<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/How-to-Store-Passwords.txt" /> 94<description> 95<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/How-to-Store-Passwords.html">read this article online</a>.</p> 96<p><strong>Disclaimer</strong>: The world of cyber-security is an incredibly complex and constantly evolving topic, and I am not a cyber-security researcher; I create projects for fun.</p> 97 98<p>Storing a password in a server can be intimidating. Password management is incredibly tricky, as anything you mess up could compromise your users' password(s). Thankfully, random websites you've never visited before have a pure HTML blog post from 2023 about that exact topic, and how to do it properly.</p> 99 100<p>Basically, it's just this sequence of steps:</p> 101 102<ul> 103<li>Generate a long random sequence of characters, this is called a <em><a href="https://en.wikipedia.org/wiki/Salt_(cryptography)">salt</a></em>(generate for each user, do not use a master salt)</li> 104<li>Prepend(or append, it doesn't matter, just keep it consistent) this to the user's password</li> 105<li>Use a <a href="https://en.wikipedia.org/wiki/Hash_function">hashing algorithm</a>, such as <a href="https://en.wikipedia.org/wiki/PBKDF2">PBKDF2</a>, to generate a unique sequence of characters that will uniquely identify that password.</li> 106<li>Store the salt and hash in the same place, <em>do not</em> store the password on it's own.</li> 107</ul> 108 109<p>And to check if a password is right, repeat the steps, except rather than generating a random sequence of characters, get the sequence of characters that you've stored along with the hash.</p> 110 111<h2 id="why-do-this">Why Do <em>This</em>?</h2> 112 113<p>You might be thinking: <em>That's a bit arbitrary innit?</em> And if you aren't then you can stop reading now.</p> 114 115<p>This method of storing passwords is the only way to ensure that you are securely storing them. So let's go through some other ways, and why they aren't so good.</p> 116 117<h3 id="plaintext-passwords">Plaintext Passwords</h3> 118 119<p>Storing your passwords in plaintext allows anyone who can get into your server to easily take any password they want, as no matter how good your users' password is, their account will be hacked if an unauthorized or malicious individual is able to get in.</p> 120 121<h3 id="encrypted-passwords">Encrypted Passwords</h3> 122 123<p>This is basically just plaintext with additional steps. As long as your master-key is stored somewhere, it will get stolen as soon as somebody manages to get into your system.</p> 124 125<h3 id="bare-hashing">Bare Hashing</h3> 126 127<p>A hash isn't able to be undone, meaning theoretically you should be able to <em>just</em> hash your password. This, while a fair assumption, has unfortunately been incorrect for quite some time. There are databases online that store every word in the english language(or just some words) in addition to common passwords and their hashes, and users will often use words for their passwords, even though it's insecure.</p> 128 129<p>This is where salts come in. Due to the nature of hashes, even a single change in a string will entirely change it's hash, as such, if you add a random sequence of characters to a string, then you can entirely change it's hash.</p> 130 131</description> 132<guid isPermaLink="false">How-to-Store-Passwords.html</guid> 133<pubDate>Thu, 02 Nov 2023 00:00:00 GMT</pubDate> 134<atom:published>2023-11-02T00:00:00Z</atom:published> 135<atom:updated>2023-11-02T00:00:00Z</atom:updated> 136</item> 137 138<item> 139<title>Satisfactory Concept: Farming</title> 140<link>https://steve0greatness.github.io/blog/satisfactory-farming-idea.html</link> 141<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/satisfactory-farming-idea.txt" /> 142<description> 143<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/satisfactory-farming-idea.html">read this article online</a>.</p> 144<p>Here is my idea for automating the collection of healing materials(such as Beryl Nuts) in Satisfactory</p> 145 146<h2 id="plant-pods">Plant Pods</h2> 147 148<p>Plant pods would be researchable in the Nutrients section of the MAM. It would cost:</p> 149 150<ul> 151<li>5 modular frames </li> 152<li>10 steel pipes</li> 153<li>20 biofuel</li> 154</ul> 155 156<p>to research.</p> 157 158<p>You'd be able to build it in a new <em>Farming</em> section in the production category of the build menu. It would cost the user:</p> 159 160<ul> 161<li>4 steel pipes</li> 162<li>2 quickwire</li> 163<li>5 biofuel</li> 164</ul> 165 166<p>to build. It would require 1 MW of power to function. Plants that are left without power while in there will not continue growing or providing harvest, however they will not die(that'd be annoying if they did).</p> 167 168<p>The user would be able to interact with the planting pod to bring up a menu that tells them what stage of growing it's at(baby, growing, fully grown), how ripe for harvest the plant is(out of 3 states: none, starting, ripe). The UI will have a button to harvest at the bottom, and a box that will allow the plant to be exchanged for another--which would give you a few leaves, proportional to how long it's been growing(0 if baby, 4 if growing, 10 if fully grown), and the amount of fruit they would have gotten from the harvest + 1 extra(for the fruit they put in).</p> 169 170<h2 id="robot-farmers">Robot Farmers</h2> 171 172<p>Researchable under the <em>Crystal Oscillator</em>. The research cost is:</p> 173 174<ul> 175<li>10 Crystal Oscillators</li> 176<li>5 AI limiter</li> 177<li>3 quickwire</li> 178</ul> 179 180<p>These little farmers need power to survive, which is why the <em>ROBOT charger</em> is unlocked with them. 181This building can be built in the power section. They cost:</p> 182 183<ul> 184<li>15 quickwire</li> 185<li>2 modular frames</li> 186<li>5 crystal oscillators</li> 187</ul> 188 189<p>to build.</p> 190 191<p>Once built, this building acts like the truck station, but instead of coal, it loads power, and it can only unload items from the bot's inventory.</p> 192 193<p>The Robo-Farmer is then buildable under the <em>Farming</em> section in the production category of the build menu. It costs:</p> 194 195<ul> 196<li>1 Factory Cart</li> 197<li>2 Crystal Oscillators</li> 198<li>1 AI limiter</li> 199<li>3 quickwire</li> 200<li>5 steal pipes</li> 201</ul> 202 203<p>to build.</p> 204 205<p>These little robots have themselves a little UI that allows you to select items they should farm. Once given a task, these robots will always return to the nearest <em>ROBOT charger</em> when their inventory is full, or they are running low on power(robots will always attempt to keep themselves powered). If the robot cannot find a plant within range that is harvestable, then the they will wait until there is one. </p> 206 207<h2 id="getting-the-most-out-of-these-resources">Getting the most out of these resources</h2> 208 209<p>Robot Farmers are best at traversing on foundations(they spend less power). As such, it is recommended, that the player create a flat platform that has plant pods with some space between for the bots to traverse between them. In the center, the player should build a <em>ROBOT charger</em>, as it will allow the robots the run around equally in each direction. Players should also utilize the <em>Conveyor Lift</em> to bring materials to a layer above for sorting, or other purposes.</p> 210 211</description> 212<guid isPermaLink="false">satisfactory-farming-idea.html</guid> 213<pubDate>Sun, 16 Apr 2023 00:00:00 GMT</pubDate> 214<atom:published>2023-04-16T00:00:00Z</atom:published> 215<atom:updated>2024-03-24T00:00:00Z</atom:updated> 216</item> 217 218<item> 219<title>TF2 disguise Command</title> 220<link>https://steve0greatness.github.io/blog/tf2-disguise-cmd.html</link> 221<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/tf2-disguise-cmd.txt" /> 222<description> 223<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/tf2-disguise-cmd.html">read this article online</a>.</p> 224<p>A Spy class-specific command</p> 225 226<h2 id="layout">Layout</h2> 227 228<p>The basic layout of the disguise command is very simple.</p> 229 230<pre><code>disguise [class] [team] 231</code></pre> 232 233<h2 id="class-parameter"><code>class</code> Parameter</h2> 234 235<p><code>1</code> : Scout</p> 236 237<p><code>2</code> : Sniper</p> 238 239<p><code>3</code> : Soldier</p> 240 241<p><code>4</code> : Demoman</p> 242 243<p><code>5</code> : Medic</p> 244 245<p><code>6</code> : Heavy</p> 246 247<p><code>7</code> : Pyro</p> 248 249<p><code>8</code> : Spy</p> 250 251<p><code>9</code> : Engineer</p> 252 253<p>The reason the classes are in this order is that they were added in that order. As mentioned in <a href="https://wiki.teamfortress.com/wiki/Team_Fortress#Versions"><em>Quake World Team Fortress</em> § Versions</a> on the Team Fortress wiki, it mentions the classes were added in the order of <em>scout</em>, <em>sniper</em>, <em>soldier</em>, <em>demoman</em>, and <em>medic</em>; then <em>heavy</em>; <em>pyro</em>; and finally <em>spy</em> and <em>engineer</em>.</p> 254 255<h2 id="team-parameter"><code>team</code> Parameter</h2> 256 257<p>These depend upon what team you're on.</p> 258 259<p><code>-1</code> : Enemy Team</p> 260 261<p><code>-2</code> : Friendly Team</p> 262 263<h3 id="specific-teams">Specific Teams</h3> 264 265<p>These aren't extremely useful, but they exist. They are independent of the team you're on. </p> 266 267<p><code>1</code> : Blu Team</p> 268 269<p><code>2</code> : Red Team</p> 270 271<h2 id="example">Example</h2> 272 273<p>Normally, when you disguise as a spy of your team, you undisguise. This also applies to the disguise command, allowing for an "undisguise" command.</p> 274 275<pre><code>disguise "8" "-2" 276</code></pre> 277 278<p>You're also able to put this into a bind, allowing for an undisguise bind.</p> 279 280</description> 281<guid isPermaLink="false">tf2-disguise-cmd.html</guid> 282<pubDate>Sat, 17 Dec 2022 00:00:00 GMT</pubDate> 283<atom:published>2022-12-17T00:00:00Z</atom:published> 284<atom:updated>2024-01-17T00:00:00Z</atom:updated> 285</item> 286 287<item> 288<title>Fortress Forever on Linux!</title> 289<link>https://steve0greatness.github.io/blog/fortress-forever-on-linux.html</link> 290<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/fortress-forever-on-linux.txt" /> 291<description> 292<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/fortress-forever-on-linux.html">read this article online</a>.</p> 293<p>Fortress Forever is finally playable fully on Linux using Proton-GE version 7-41, although there's a bug where if you change the settings then try to connect to a server: the game crashes. This issue, however, is very easily solved by rebooting the game.</p> 294 295<p>If you need a quick rundown on how to download and install Proton-GE, <a href="https://youtu.be/B2LZ8nYd3Bw">I've made a video about that already</a>. It is technically about a different game, but the problem is still similar enough to apply pretty much the same steps.</p> 296 297<p>It plays pretty well, the only problem is when a local server changes maps, and the font for some of the menus(and the chat) being very... bad looking. It's not the game's fault for the second one, however, it is still something that's annoying if you don't want to do too much tinkering(I was never able to fix it, though).</p> 298 299<p>I'm glad to be able to play this great game on my (used to be) daily drive OS without having to open <a href="https://usebottles.com/">Bottles</a> every time I want to play Fortress Forever.</p> 300 301<p>Whenever I'm playing Fortress Forever, I'm usually on <a href="https://www.gametracker.com/server_info/server2.maxcommunity.net:270150">MaxTF's Midwest server</a>. The reason why is that it's the server that I have the lowest ping on, still not <em>great</em> ping though.</p> 302 303</description> 304<guid isPermaLink="false">fortress-forever-on-linux.html</guid> 305<pubDate>Fri, 16 Dec 2022 00:00:00 GMT</pubDate> 306<atom:published>2022-12-16T00:00:00Z</atom:published> 307<atom:updated>2024-02-04T00:00:00Z</atom:updated> 308</item> 309 310<item> 311<title>MacOS Keyboard Navigation</title> 312<link>https://steve0greatness.github.io/blog/macos-page-tab-nav.html</link> 313<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/macos-page-tab-nav.txt" /> 314<description> 315<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/macos-page-tab-nav.html">read this article online</a>.</p> 316<p>Ok, so I feel like a complete idiot right now.</p> 317 318<p>I've been trying to use <kbd>Tab</kbd> to navigate webpages on my MacBook for what feels like forever now. Turns out, it was as simple as hitting <kbd><kbd>Ctrl</kbd>+<kbd>F7</kbd></kbd>.</p> 319 320<p>To be honest, I thought that it was just an issue with FireFox, and then I read <a href="https://www.a11yproject.com/posts/macos-browser-keyboard-navigation/">Browser keyboard navigation in macOS</a> by <a href="https://scottvinkle.me/">Scott Vinkle</a> for <a href="https://www.a11yproject.com/">The A11Y Project</a> and realized that it was an issue with MacOS! This should really be enabled by default, but Apple is stupid.</p> 321 322<p>Just thought I'd share this encase anyone else was having this issue.</p> 323 324</description> 325<guid isPermaLink="false">macos-page-tab-nav.html</guid> 326<pubDate>Sat, 26 Feb 2022 00:00:00 GMT</pubDate> 327<atom:published>2022-02-26T00:00:00Z</atom:published> 328<atom:updated>2024-02-14T00:00:00Z</atom:updated> 329</item> 330 331<item> 332<title>The FizzBuzz Program</title> 333<link>https://steve0greatness.github.io/blog/fizzbuzz.html</link> 334<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/fizzbuzz.txt" /> 335<description> 336<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/fizzbuzz.html">read this article online</a>.</p> 337<p>A FizzBuzz Program is a program used in many job interviews to see if a programmer is good at problem solving. There are many ways to make one.</p> 338 339<p>First let me tell you why I write these programs. These programs, at least in my opinion, are good when you're learning a new programming language. It gives you a problem to solve, and all you need to do to solve it. Incase you're wondering, the problem is to make a program that counts from 1 to 100 and replaces all multiples of 3 with Fizz, all multiples of 5 with Buzz, and multiples of both with FizzBuzz. Generally in interviews, they also ask you to add on more multiples, such as multiples of 7 are replaced with Fuzz, and multiples of 11 are replaced with Bizz.</p> 340 341<p>Now that I've told you what a FizzBuzz Program is, let me show you how I make them in Python.</p> 342 343<div class="codehilite"> 344<pre><span></span><code><span class="k">for</span> <span class="n">Index</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">100</span><span class="p">):</span> 345<span class="n">Response</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span> 346<span class="nb">print</span><span class="p">(</span><span class="n">Response</span><span class="p">)</span> 347</code></pre> 348</div> 349 350<p>The first thing I do is I create a for loop, and within it I put a print statement and a variable named toPrint.</p> 351 352<div class="codehilite"> 353<pre><span></span><code><span class="k">def</span> <span class="nf">FizzCompute</span><span class="p">(</span><span class="n">Number</span><span class="p">,</span> <span class="n">Divisor</span><span class="p">,</span> <span class="n">String</span><span class="p">):</span> 354<span class="k">return</span> <span class="n">String</span> <span class="k">if</span> <span class="n">Number</span> <span class="o">%</span> <span class="n">Divisor</span> <span class="o">==</span> <span class="mi">0</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span> 355 356<span class="k">def</span> <span class="nf">SubstituteEmpty</span><span class="p">(</span><span class="n">String</span><span class="p">,</span> <span class="n">Number</span><span class="p">):</span> 357<span class="k">return</span> <span class="n">String</span> <span class="k">if</span> <span class="n">String</span> <span class="o">!=</span> <span class="s2">&quot;&quot;</span> <span class="k">else</span> <span class="n">Number</span> 358 359<span class="k">for</span> <span class="n">Index</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">100</span><span class="p">):</span> 360<span class="n">Response</span> <span class="o">=</span> <span class="n">SubstituteEmpty</span><span class="p">(</span><span class="n">FizzCompute</span><span class="p">(</span><span class="n">Index</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="s2">&quot;Fizz&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="n">FizzCompute</span><span class="p">(</span><span class="n">Index</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="s2">&quot;Buzz&quot;</span><span class="p">),</span> <span class="n">Index</span><span class="p">)</span> 361<span class="nb">print</span><span class="p">(</span><span class="n">Response</span><span class="p">)</span> 362</code></pre> 363</div> 364 365<p><details> 366<summary>Output</summary> 367<samp>1 3682 369Fizz 3704 371Buzz 372Fizz 3737 3748 375Fizz 376Buzz 37711 378Fizz 37913 38014 381FizzBuzz 38216 38317 384Fizz 38519 386Buzz 387Fizz 38822 38923 390Fizz 391Buzz 39226 393Fizz 39428 39529 396FizzBuzz 39731 39832 399Fizz 40034 401Buzz 402Fizz 40337 40438 405Fizz 406Buzz 40741 408Fizz 40943 41044 411FizzBuzz 41246 41347 414Fizz 41549 416Buzz 417Fizz 41852 41953 420Fizz 421Buzz 42256 423Fizz 42458 42559 426FizzBuzz 42761 42862 429Fizz 43064 431Buzz 432Fizz 43367 43468 435Fizz 436Buzz 43771 438Fizz 43973 44074 441FizzBuzz 44276 44377 444Fizz 44579 446Buzz 447Fizz 44882 44983 450Fizz 451Buzz 45286 453Fizz 45488 45589 456FizzBuzz 45791 45892 459Fizz 46094 461Buzz 462Fizz 46397 46498 465Fizz</samp> 466</details></p> 467 468<p>The next thing I do is I define a function that checks if one number is a multiple of another, and if it is, then it returns the string, otherwise, it returns an empty string.</p> 469 470<p>Then I make a function that checks if a string is an empty one, if it is, then it returns a number.</p> 471 472<p>Once I have these 2 functions, I go back into the for loop and make the <code>Response</code> variable have the variable for checking if a string is empty(and if it is replace it with a number) check if 2 of the other function that check if one number is a multiple of another(and if it is, return a string). Finally, it prints the output.</p> 473 474<p>I've tried this method many times. Below are some examples of this method in action!</p> 475 476<ul> 477<li><a href="https://replit.com/@StevesGreatness/FizzBuzzKotlin">Kotlin</a></li> 478<li><a href="https://replit.com/@StevesGreatness/FizzBuzzlua">Lua</a></li> 479<li><a href="https://replit.com/@StevesGreatness/FizzBuzzpython">Python</a></li> 480<li><a href="https://replit.com/@StevesGreatness/FizzBuzzRuby">Ruby</a></li> 481</ul> 482 483</description> 484<guid isPermaLink="false">fizzbuzz.html</guid> 485<pubDate>Sun, 20 Feb 2022 00:00:00 GMT</pubDate> 486<atom:published>2022-02-20T00:00:00Z</atom:published> 487<atom:updated>2024-02-02T00:00:00Z</atom:updated> 488</item> 489 490<item> 491<title>Customize an HTML Checkbox</title> 492<link>https://steve0greatness.github.io/blog/checkbox-custom-styles.html</link> 493<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/checkbox-custom-styles.txt" /> 494<description> 495<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/checkbox-custom-styles.html">read this article online</a>.</p> 496<p><strong>TL;DR</strong>: <code>appearance: none;</code>.</p> 497 498<p>Checkboxes are hard to style. But when you're making a website, they may look ugly.</p> 499 500<p><input type="checkbox" style="all: revert;" /></p> 501 502<p>As you can see here, this bland checkbox does not fit into my clearly great website(/s). But really, it does not fit in at all.</p> 503 504<p>The first step toward styling it how we want it is to give it an appearance of none, and a width and height that are what you want.</p> 505 506<div class="codehilite"> 507<pre><span></span><code><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&quot;checkbox&quot;</span><span class="o">]</span><span class="w"> </span><span class="p">{</span> 508<span class="w"> </span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 509<span class="w"> </span><span class="k">width</span><span class="p">:</span><span class="w"> </span><span class="mi">15</span><span class="kt">px</span><span class="p">;</span> 510<span class="w"> </span><span class="k">height</span><span class="p">:</span><span class="w"> </span><span class="mi">15</span><span class="kt">px</span><span class="p">;</span> 511<span class="w"> </span><span class="k">background-color</span><span class="p">:</span><span class="w"> </span><span class="kc">grey</span><span class="p">;</span> 512<span class="p">}</span> 513</code></pre> 514</div> 515 516<p><br /></p> 517 518<iframe src="/blog-files/checkbox-custom-styles-ex1.html" style="background: #000; border: none"></iframe> 519 520<p><a href="/blog-files/checkbox-custom-styles-ex1.txt">View Source</a></p> 521 522<p>Now we can do whatever we want to it. You're also able to add a <code>:checked</code> sudo to change certain elements(like the <code>background-color</code>) depending on if the checkbox is checked or not.</p> 523 524<div class="codehilite"> 525<pre><span></span><code><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&quot;checkbox&quot;</span><span class="o">]</span><span class="w"> </span><span class="p">{</span> 526<span class="w"> </span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 527<span class="w"> </span><span class="k">width</span><span class="p">:</span><span class="w"> </span><span class="mi">15</span><span class="kt">px</span><span class="p">;</span> 528<span class="w"> </span><span class="k">height</span><span class="p">:</span><span class="w"> </span><span class="mi">15</span><span class="kt">px</span><span class="p">;</span> 529<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#000</span><span class="p">;</span> 530<span class="w"> </span><span class="k">border</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="kt">px</span><span class="w"> </span><span class="mh">#fff</span><span class="w"> </span><span class="kc">solid</span><span class="p">;</span> 531<span class="w"> </span><span class="k">border-radius</span><span class="p">:</span><span class="w"> </span><span class="mi">2</span><span class="kt">px</span><span class="p">;</span> 532<span class="p">}</span> 533 534<span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="s2">&quot;checkbox&quot;</span><span class="o">]</span><span class="p">:</span><span class="nd">checked</span><span class="w"> </span><span class="p">{</span> 535<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#ce5aff</span><span class="p">;</span> 536<span class="p">}</span> 537</code></pre> 538</div> 539 540<p><br /></p> 541 542<iframe src="/blog-files/checkbox-custom-styles-ex2.html" style="background: #000; border: none"></iframe> 543 544<p><a href="/blog-files/checkbox-custom-styles-ex2.html">View Source</a></p> 545 546</description> 547<guid isPermaLink="false">checkbox-custom-styles.html</guid> 548<pubDate>Sat, 19 Feb 2022 00:00:00 GMT</pubDate> 549<atom:published>2022-02-19T00:00:00Z</atom:published> 550<atom:updated>2024-02-02T00:00:00Z</atom:updated> 551</item> 552 553<item> 554<title>Creating a Switch in HTML and CSS</title> 555<link>https://steve0greatness.github.io/blog/creatingaswitch.html</link> 556<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/creatingaswitch.txt" /> 557<description> 558<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/creatingaswitch.html">read this article online</a>.</p> 559<p>A switch is something that is basically just a nicer looking checkbox. Here, I'll be showing you how to make one.</p> 560 561<p>The first step is to create checkbox with any class; I'll be using <code>switch</code>, because it's a switch.</p> 562 563<div class="codehilite"> 564<pre><span></span><code><span class="p">&lt;</span><span class="nt">style</span><span class="p">&gt;</span> 565<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="w"> </span><span class="p">{}</span> 566<span class="p">&lt;/</span><span class="nt">style</span><span class="p">&gt;</span> 567<span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;switch&quot;</span> <span class="p">/&gt;</span> 568</code></pre> 569</div> 570 571<p>Next step is to add an appearance of none to the CSS--make sure to add <code>-moz-</code> and <code>-webkit-</code>. After that, you're going to want to set it so that the checkbox a rectangle--make sure it's in <code>px</code>. We also want to set the position to relative</p> 572 573<div class="codehilite"> 574<pre><span></span><code><span class="p">&lt;</span><span class="nt">style</span><span class="p">&gt;</span> 575<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="w"> </span><span class="p">{</span> 576<span class="w"> </span><span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 577<span class="w"> </span><span class="kp">-moz-</span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 578<span class="w"> </span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 579<span class="w"> </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">relative</span><span class="p">;</span> 580<span class="w"> </span><span class="p">}</span> 581<span class="p">&lt;/</span><span class="nt">style</span><span class="p">&gt;</span> 582<span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;switch&quot;</span> <span class="p">/&gt;</span> 583</code></pre> 584</div> 585 586<p>Next we want to create <code>::before</code> pseudo. In there we want to make it have a position of relative, a width and height that are <code>-1px</code> less than the height of the main switch, a display of block, top and left set to <code>1px</code>, a content of <code>""</code>, and a background color that's different from the one in the main switch.</p> 587 588<div class="codehilite"> 589<pre><span></span><code><span class="p">&lt;</span><span class="nt">style</span><span class="p">&gt;</span> 590<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="w"> </span><span class="p">{</span> 591<span class="w"> </span><span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 592<span class="w"> </span><span class="kp">-moz-</span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 593<span class="w"> </span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 594<span class="w"> </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">relative</span><span class="p">;</span> 595<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#000</span><span class="p">;</span> 596<span class="w"> </span><span class="k">width</span><span class="p">:</span><span class="w"> </span><span class="mi">30</span><span class="kt">px</span><span class="p">;</span> 597<span class="w"> </span><span class="k">height</span><span class="p">:</span><span class="w"> </span><span class="mi">16</span><span class="kt">px</span><span class="p">;</span> 598<span class="w"> </span><span class="p">}</span> 599<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="p">::</span><span class="nd">before</span><span class="w"> </span><span class="p">{</span> 600<span class="w"> </span><span class="k">top</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="kt">px</span><span class="p">;</span> 601<span class="w"> </span><span class="k">left</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="kt">px</span><span class="p">;</span> 602<span class="w"> </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">absolute</span><span class="p">;</span> 603<span class="w"> </span><span class="k">display</span><span class="p">:</span><span class="w"> </span><span class="kc">block</span><span class="p">;</span> 604<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="kc">red</span><span class="p">;</span> 605<span class="w"> </span><span class="k">content</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">;</span> 606<span class="w"> </span><span class="k">width</span><span class="p">:</span><span class="w"> </span><span class="mi">14</span><span class="kt">px</span><span class="p">;</span> 607<span class="w"> </span><span class="k">height</span><span class="p">:</span><span class="w"> </span><span class="mi">14</span><span class="kt">px</span><span class="p">;</span> 608<span class="w"> </span><span class="p">}</span> 609<span class="p">&lt;/</span><span class="nt">style</span><span class="p">&gt;</span> 610<span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;switch&quot;</span> <span class="p">/&gt;</span> 611</code></pre> 612</div> 613 614<p>Finally add a pseudo called <code>:checked</code> which checks if a checkbox was checked, you'll want to change the before pseudo if the the checkbox is checked. You'll need to put it on the opposite side of where it started, for me, that's on the right-side.</p> 615 616<div class="codehilite"> 617<pre><span></span><code><span class="p">&lt;</span><span class="nt">style</span><span class="p">&gt;</span> 618<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="w"> </span><span class="p">{</span> 619<span class="w"> </span><span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 620<span class="w"> </span><span class="kp">-moz-</span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 621<span class="w"> </span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 622<span class="w"> </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">relative</span><span class="p">;</span> 623<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#000</span><span class="p">;</span> 624<span class="w"> </span><span class="k">width</span><span class="p">:</span><span class="w"> </span><span class="mi">30</span><span class="kt">px</span><span class="p">;</span> 625<span class="w"> </span><span class="k">height</span><span class="p">:</span><span class="w"> </span><span class="mi">16</span><span class="kt">px</span><span class="p">;</span> 626<span class="w"> </span><span class="p">}</span> 627<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="p">::</span><span class="nd">before</span><span class="w"> </span><span class="p">{</span> 628<span class="w"> </span><span class="k">top</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="kt">px</span><span class="p">;</span> 629<span class="w"> </span><span class="k">left</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="kt">px</span><span class="p">;</span> 630<span class="w"> </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">absolute</span><span class="p">;</span> 631<span class="w"> </span><span class="k">display</span><span class="p">:</span><span class="w"> </span><span class="kc">block</span><span class="p">;</span> 632<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="kc">red</span><span class="p">;</span> 633<span class="w"> </span><span class="k">content</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">;</span> 634<span class="w"> </span><span class="k">width</span><span class="p">:</span><span class="w"> </span><span class="mi">14</span><span class="kt">px</span><span class="p">;</span> 635<span class="w"> </span><span class="k">height</span><span class="p">:</span><span class="w"> </span><span class="mi">14</span><span class="kt">px</span><span class="p">;</span> 636<span class="w"> </span><span class="p">}</span> 637<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="p">:</span><span class="nd">checked</span><span class="p">::</span><span class="nd">before</span><span class="w"> </span><span class="p">{</span> 638<span class="w"> </span><span class="k">left</span><span class="p">:</span><span class="w"> </span><span class="mi">15</span><span class="kt">px</span><span class="p">;</span><span class="w"> </span><span class="c">/* .switch width - .switch::before width - 1px */</span> 639<span class="w"> </span><span class="p">}</span> 640<span class="p">&lt;/</span><span class="nt">style</span><span class="p">&gt;</span> 641<span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;switch&quot;</span> <span class="p">/&gt;</span> 642</code></pre> 643</div> 644 645<p>I'm using the <code>left</code> property instead of the <code>right</code> property as it makes it easier to transition between the 2 positions. Here is the CSS with the transition added in, plus a background change(also dark mode):</p> 646 647<div class="codehilite"> 648<pre><span></span><code><span class="p">&lt;</span><span class="nt">style</span><span class="p">&gt;</span> 649<span class="w"> </span><span class="p">:</span><span class="nd">root</span><span class="w"> </span><span class="p">{</span> 650<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#000</span><span class="p">;</span> 651<span class="w"> </span><span class="k">color</span><span class="p">:</span><span class="w"> </span><span class="mh">#fff</span><span class="p">;</span> 652<span class="w"> </span><span class="p">}</span> 653<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="w"> </span><span class="p">{</span> 654<span class="w"> </span><span class="kp">-webkit-</span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 655<span class="w"> </span><span class="kp">-moz-</span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 656<span class="w"> </span><span class="k">appearance</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span> 657<span class="w"> </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">relative</span><span class="p">;</span> 658<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#fff</span><span class="p">;</span> 659<span class="w"> </span><span class="k">width</span><span class="p">:</span><span class="w"> </span><span class="mi">30</span><span class="kt">px</span><span class="p">;</span> 660<span class="w"> </span><span class="k">height</span><span class="p">:</span><span class="w"> </span><span class="mi">16</span><span class="kt">px</span><span class="p">;</span> 661<span class="w"> </span><span class="p">}</span> 662<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="p">::</span><span class="nd">before</span><span class="w"> </span><span class="p">{</span> 663<span class="w"> </span><span class="k">top</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="kt">px</span><span class="p">;</span> 664<span class="w"> </span><span class="k">left</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="kt">px</span><span class="p">;</span> 665<span class="w"> </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">absolute</span><span class="p">;</span> 666<span class="w"> </span><span class="k">display</span><span class="p">:</span><span class="w"> </span><span class="kc">block</span><span class="p">;</span> 667<span class="w"> </span><span class="k">background-color</span><span class="p">:</span><span class="w"> </span><span class="mh">#ff5c1c</span><span class="p">;</span> 668<span class="w"> </span><span class="k">content</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">;</span> 669<span class="w"> </span><span class="k">width</span><span class="p">:</span><span class="w"> </span><span class="mi">14</span><span class="kt">px</span><span class="p">;</span> 670<span class="w"> </span><span class="k">height</span><span class="p">:</span><span class="w"> </span><span class="mi">14</span><span class="kt">px</span><span class="p">;</span> 671<span class="w"> </span><span class="k">transition</span><span class="p">:</span><span class="w"> </span><span class="k">background-color</span><span class="w"> </span><span class="mf">.5</span><span class="kt">s</span><span class="p">,</span><span class="w"> </span><span class="kc">left</span><span class="w"> </span><span class="mf">.5</span><span class="kt">s</span><span class="p">;</span> 672<span class="w"> </span><span class="p">}</span> 673<span class="w"> </span><span class="nt">input</span><span class="o">[</span><span class="nt">type</span><span class="o">=</span><span class="nt">checkbox</span><span class="o">]</span><span class="p">.</span><span class="nc">switch</span><span class="p">:</span><span class="nd">checked</span><span class="p">::</span><span class="nd">before</span><span class="w"> </span><span class="p">{</span> 674<span class="w"> </span><span class="k">left</span><span class="p">:</span><span class="w"> </span><span class="mi">15</span><span class="kt">px</span><span class="p">;</span><span class="w"> </span><span class="c">/* .switch width - .switch::before width - 1px */</span> 675<span class="w"> </span><span class="k">background-color</span><span class="p">:</span><span class="w"> </span><span class="mh">#3f9b00</span><span class="p">;</span> 676<span class="w"> </span><span class="p">}</span> 677<span class="p">&lt;/</span><span class="nt">style</span><span class="p">&gt;</span> 678<span class="p">&lt;</span><span class="nt">input</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;checkbox&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;switch&quot;</span> <span class="p">/&gt;</span> 679</code></pre> 680</div> 681 682<p>All of this results in a final product that looks like:</p> 683 684<iframe style="background: #fff; border: none" src="/blog-files/switch-final.html"></iframe> 685 686<p><a href="/blog-files/switch-final.txt">See Code</a></p> 687 688</description> 689<guid isPermaLink="false">creatingaswitch.html</guid> 690<pubDate>Fri, 11 Feb 2022 00:00:00 GMT</pubDate> 691<atom:published>2022-02-11T00:00:00Z</atom:published> 692<atom:updated>2023-02-02T00:00:00Z</atom:updated> 693</item> 694 695<item> 696<title>Why local variables are called "let"</title> 697<link>https://steve0greatness.github.io/blog/whyLocalVarCallLet.html</link> 698<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/whyLocalVarCallLet.txt" /> 699<description> 700<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/whyLocalVarCallLet.html">read this article online</a>.</p> 701<p>In JavaScript there are 3 different kinds of variables, global variables(using <code>var</code>), constants(<code>const</code>, and local variables<code>let</code>). All of the act a little differently from each other. Allow me to explain what they do.</p> 702 703<p>Global variables, made using <code>var</code>, are as they sound, global variables. Once defined, they can be used, edited, or redefined anywhere.</p> 704 705<p>Constants, defined with <code>const</code>, are constant, they cannot change, at all.</p> 706 707<p>Local variables, defined with <code>let</code>, are variables that can only be used in the place that it is defined, like a function, and it's children.</p> 708 709<p>Now that we has that established, <em>let</em>'s talk about how local variables got their name.</p> 710 711<p>Turns out "let" is a mathematical term.</p> 712 713<blockquote> 714<p>The <strong>"let" expression</strong> may also be defined in mathematics, where it associates a Boolean condition with a restricted scope. 715<cite>Quote from <a href="https://en.wikipedia.org/w/index.php?title=Let_expression&oldid=1187985658">Wikipedia "Let expression"</a> as of <time>2024 Feb 2</time></cite></p> 716</blockquote> 717 718<p>It was first used in programming in early languages like Basic.</p> 719 720<p>In case you're wondering, the main source is an answer on Stack Overflow: <em>"Why was the name 'let' chosen for block-scoped variable declarations in JavaScript?"</em>, answer by <a href="https://stackoverflow.com/users/1968972">exebook</a>, edited by <a href="https://stackoverflow.com/users/1741346">Pikamander2</a>; <a href="https://stackoverflow.com/a/37917071">link</a>.</p> 721 722</description> 723<guid isPermaLink="false">whyLocalVarCallLet.html</guid> 724<pubDate>Mon, 10 Jan 2022 00:00:00 GMT</pubDate> 725<atom:published>2022-01-10T00:00:00Z</atom:published> 726<atom:updated>2024-02-02T00:00:00Z</atom:updated> 727</item> 728 729<item> 730<title>The Song we didn't get in Undertale</title> 731<link>https://steve0greatness.github.io/blog/The_song_that_we_didnt_get_in_undertale.html</link> 732<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/The_song_that_we_didnt_get_in_undertale.txt" /> 733<description> 734<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/The_song_that_we_didnt_get_in_undertale.html">read this article online</a>.</p> 735<p>Undertale is an amazing game. I really enjoyed my time playing it. I listen to the sound track a lot(I'm doing it as I write this). I even read a fan-made <abbr title="Alternate Universe"><a href="https://undertale-au.fandom.com/wiki/Category:AUs">AU</a></abbr> called <a href="https://invertedfate.com/chapters">Inverted Fate</a>. The only thing that I haven't done(and don't intend on doing) is a <a href="https://undertale.fandom.com/wiki/Genocide_Route">Genocide Run</a>. But, there's one thing that's kinda been bugging me since it first found out about it. It's the fact that their's a version of <a href="https://undertale.fandom.com/wiki/Undertale_(Soundtrack)">Undertale(the song)</a> that wasn't added, and instead was replaced with the version we have now.</p> 736 737<h2 id="the-current-version">The Current Version</h2> 738 739<p>The version we got of Undertale was a pretty good one. It's a little sad, while also filled with hope(just like the monsters in the neutral route. It is kinda the song of their hope, since it only plays during the end of the neutral route). Below is the version we got in the game.</p> 740 741<p><audio controls="true"> 742<source src="/blog-files/Undertale_(Soundtrack)_music_1.ogg" type="audio/ogg" /> 743<source src="https://ia902907.us.archive.org/29/items/undertaleost_202004/Undertale%20-%20Lossless%20Soundtrack%20%28toby%20fox%29/toby%20fox%20-%20UNDERTALE%20Soundtrack%20-%2071%20Undertale.mp3" type="audio/mpeg" /> 744<source src="https://ia802907.us.archive.org/29/items/undertaleost_202004/Undertale%20-%20Lossless%20Soundtrack%20%28toby%20fox%29/toby%20fox%20-%20UNDERTALE%20Soundtrack%20-%2071%20Undertale.flac" type="audio/flac" /> 745It looks like your browser doesn't support the audio tag. Here is it's source: <a href="/blog-files/Undertale_(Soundtrack)_music_1.ogg">anchor</a>. 746</audio></p> 747 748<h2 id="the-one-that-could-have-been">The One that could have been</h2> 749 750<p>This one is also great, and I personally think I like it a lot better than the one we have. I feel like it's more happy in tone. Even if it might not fit with what the game would have been trying to fit it's context into, it's still a good song on it's own.</p> 751 752<p><audio controls="true"> 753<source src="/blog-files/Undertale_(Soundtrack)_music_unused.oga" type="audio/ogg" /> 754<source src="https://a.tumblr.com/tumblr_odg4sv0r3Z1s58ev6o1.mp3" type="audio/mpeg" /> 755Again, it looks like you're browser doesn't support audio, so you can <a href="/blog-files/Undertale_(Soundtrack)_music_unused.oga">download the song</a> to listen to it. 756</audio></p> 757 758</description> 759<guid isPermaLink="false">The_song_that_we_didnt_get_in_undertale.html</guid> 760<pubDate>Mon, 20 Dec 2021 00:00:00 GMT</pubDate> 761<atom:published>2021-12-20T00:00:00Z</atom:published> 762<atom:updated>2024-02-02T00:00:00Z</atom:updated> 763</item> 764 765<item> 766<title>Create a Theme Switch</title> 767<link>https://steve0greatness.github.io/blog/creating_a_theme_switch.html</link> 768<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/creating_a_theme_switch.txt" /> 769<description> 770<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/creating_a_theme_switch.html">read this article online</a>.</p> 771<p>This is a simple tutorial on how to make a simple theme switcher.</p> 772 773<p>First step is to create the themes you'll want on your site. You may just want a light and dark mode, however, you may also want other themes. As an example: a clown theme that makes the page absurdly colorful, like a GeoCities site in the early 2000s. For these themes, you can use CSS variables set on the <code>html</code> parent tag(all other elements are considered children of <code>html</code>). Variables can be set in CSS using double hyphens followed by a sequence of text that can use numbers(but not at the start), letters(capital or lowercase), underscores, and hyphens; these variables can then be accessed within your text using the <code>var()</code> function with the name of the variable(including the starting hyphens). You can change out the CSS variables using different selectors on the <code>html</code> tag within the CSS, for me: I'm using the <code>[data-theme]</code> attribute; however, you can use classes if you want. Here is the CSS I wrote:</p> 774 775<div class="codehilite"> 776<pre><span></span><code><span class="nt">html</span><span class="o">[</span><span class="nt">data-theme</span><span class="o">=</span><span class="nt">light</span><span class="o">]</span><span class="w"> </span><span class="p">{</span> 777<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#fff</span><span class="p">;</span> 778<span class="w"> </span><span class="k">color</span><span class="p">:</span><span class="w"> </span><span class="mh">#000</span><span class="p">;</span> 779<span class="w"> </span><span class="nv">--buttonBackground</span><span class="p">:</span><span class="w"> </span><span class="mh">#fefefe</span><span class="p">;</span> 780<span class="w"> </span><span class="nv">--buttonBorder</span><span class="p">:</span><span class="w"> </span><span class="mh">#ccc</span><span class="p">;</span> 781<span class="w"> </span><span class="nv">--buttonColor</span><span class="p">:</span><span class="w"> </span><span class="mh">#001</span><span class="p">;</span> 782<span class="p">}</span> 783<span class="nt">html</span><span class="o">[</span><span class="nt">data-theme</span><span class="o">=</span><span class="nt">dark</span><span class="o">]</span><span class="w"> </span><span class="p">{</span> 784<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#000</span><span class="p">;</span> 785<span class="w"> </span><span class="k">color</span><span class="p">:</span><span class="w"> </span><span class="mh">#fff</span><span class="p">;</span> 786<span class="w"> </span><span class="nv">--buttonBackground</span><span class="p">:</span><span class="w"> </span><span class="mh">#101010</span><span class="p">;</span> 787<span class="w"> </span><span class="nv">--buttonBorder</span><span class="p">:</span><span class="w"> </span><span class="mh">#333</span><span class="p">;</span> 788<span class="w"> </span><span class="nv">--buttonColor</span><span class="p">:</span><span class="w"> </span><span class="mh">#fff</span><span class="p">;</span> 789<span class="p">}</span> 790<span class="nt">html</span><span class="o">[</span><span class="nt">data-theme</span><span class="o">=</span><span class="nt">clown</span><span class="o">]</span><span class="w"> </span><span class="p">{</span> 791<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="mh">#f00</span><span class="p">;</span> 792<span class="w"> </span><span class="k">color</span><span class="p">:</span><span class="w"> </span><span class="mh">#00f</span><span class="p">;</span> 793<span class="w"> </span><span class="nv">--buttonBackground</span><span class="p">:</span><span class="w"> </span><span class="mh">#050</span><span class="p">;</span> 794<span class="w"> </span><span class="nv">--buttonBorder</span><span class="p">:</span><span class="w"> </span><span class="mh">#0a0</span><span class="p">;</span> 795<span class="w"> </span><span class="nv">--buttonColor</span><span class="p">:</span><span class="w"> </span><span class="mh">#0f0</span><span class="p">;</span> 796<span class="p">}</span> 797<span class="nt">button</span><span class="w"> </span><span class="p">{</span> 798<span class="w"> </span><span class="k">background</span><span class="p">:</span><span class="w"> </span><span class="nf">var</span><span class="p">(</span><span class="nv">--buttonBackground</span><span class="p">);</span> 799<span class="w"> </span><span class="k">border</span><span class="p">:</span><span class="w"> </span><span class="nf">var</span><span class="p">(</span><span class="nv">--buttonBorder</span><span class="p">)</span><span class="w"> </span><span class="kc">solid</span><span class="w"> </span><span class="mi">3</span><span class="kt">px</span><span class="p">;</span> 800<span class="w"> </span><span class="k">color</span><span class="p">:</span><span class="w"> </span><span class="nf">var</span><span class="p">(</span><span class="nv">--buttonColor</span><span class="p">);</span> 801<span class="p">}</span> 802</code></pre> 803</div> 804 805<p>Now we need to create a button that we will use to change the <code>[data-theme]</code> attribute. You (probably) already know what buttons are, so I won't go in depth about then. However: you will need to add an <code>[id]</code> to the button, this will come in play shortly.</p> 806 807<div class="codehilite"> 808<pre><span></span><code><span class="p">&lt;</span><span class="nt">button</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;theme-switch&quot;</span><span class="p">&gt;</span>Switch Theme<span class="p">&lt;/</span><span class="nt">button</span><span class="p">&gt;</span> 809</code></pre> 810</div> 811 812<p>Now, it is time to write the JavaScript. First, you'll want to make a constant with the themes you filled into your CSS, for me, that was <code>dark</code>, <code>light</code>, and <code>clown</code>. I'll name this <code>themes</code>.</p> 813 814<div class="codehilite"> 815<pre><span></span><code><span class="kd">const</span><span class="w"> </span><span class="nx">themes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;light&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;dark&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;clown&quot;</span><span class="p">];</span> 816</code></pre> 817</div> 818 819<p>We now need to query the <abbr title="Document Object Model">DOM</abbr> for our theme switch button. This can be done in 2 ways: <code>document.querySelector</code> or <code>document.getElementById</code>; personally, I prefer <code>querySelector</code>, as it allows you to write a CSS selector to get an element from the DOM, allowing for shorter, more digestible, code.</p> 820 821<p>We have to add a click event to the button. This can be done in 2 ways within JavaScript: <code>addEventListener("click", ...)</code> and <code>onclick</code>. I personally like <code>addEventListener</code> more, so I'll use that. Within the <code>addEventListener</code> function, you need to put a function. This function will control the logic of our theme switch. I'll call this function <code>SwitchTheme</code>, to reflect it's functionality.</p> 822 823<div class="codehilite"> 824<pre><span></span><code><span class="kd">const</span><span class="w"> </span><span class="nx">ThemeSwitchButton</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="s2">&quot;#theme-switch&quot;</span><span class="p">);</span> 825<span class="nx">ThemeSwitchButton</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="s2">&quot;click&quot;</span><span class="p">,</span><span class="w"> </span><span class="nx">SwitchTheme</span><span class="p">());</span> 826<span class="kd">function</span><span class="w"> </span><span class="nx">SwitchTheme</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span> 827</code></pre> 828</div> 829 830<p>Explaining each part of this function as it's written out would take awhile, so instead, I'll add comments to the ends of each line giving a short explanation. Also, for the sake of shortness, I've placed <code>document.documentElement</code> inside the constant <code>HTML</code>, giving us access to the root element in the DOM(<code>html</code>).</p> 831 832<div class="codehilite"> 833<pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="nx">CurrentTheme</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">themes</span><span class="p">.</span><span class="nx">indexOf</span><span class="p">(</span><span class="nx">HTML</span><span class="p">.</span><span class="nx">dataset</span><span class="p">.</span><span class="nx">theme</span><span class="p">);</span><span class="w"> </span><span class="c1">// Gets how far in the current theme is into the &quot;themes&quot; constant.</span> 834<span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="nx">CurrentTheme</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">1</span><span class="w"> </span><span class="o">&gt;=</span><span class="w"> </span><span class="nx">themes</span><span class="p">.</span><span class="nx">length</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c1">// Checks if it&#39;s at the end of the array,</span> 835<span class="w"> </span><span class="nx">HTML</span><span class="p">.</span><span class="nx">dataset</span><span class="p">.</span><span class="nx">theme</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">themes</span><span class="p">[</span><span class="mf">0</span><span class="p">];</span><span class="w"> </span><span class="c1">// If so, reset at the start.</span> 836<span class="w"> </span><span class="k">return</span><span class="p">;</span><span class="w"> </span><span class="c1">// Ends the function here, preventing next bit of code from running.</span> 837<span class="p">}</span> 838<span class="nx">HTML</span><span class="p">.</span><span class="nx">dataset</span><span class="p">.</span><span class="nx">theme</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nx">themes</span><span class="p">[</span><span class="nx">CurrentTheme</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="mf">1</span><span class="p">];</span><span class="w"> </span><span class="c1">// Goes to the next theme.</span> 839</code></pre> 840</div> 841 842<p>Now we have a finished product. Here's the expected output:</p> 843 844<iframe id="finalProduct" src="/blog-files/theme-change-final.html" style="border:none"></iframe> 845 846<p><a href="/blog-files/theme-change-final.txt">See Code</a></p> 847 848</description> 849<guid isPermaLink="false">creating_a_theme_switch.html</guid> 850<pubDate>Wed, 08 Dec 2021 00:00:00 GMT</pubDate> 851<atom:published>2021-12-08T00:00:00Z</atom:published> 852<atom:updated>2024-02-03T00:00:00Z</atom:updated> 853</item> 854 855<item> 856<title>Is Kris the Knight?</title> 857<link>https://steve0greatness.github.io/blog/Is_Kris_the_Knight.html</link> 858<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/Is_Kris_the_Knight.txt" /> 859<description> 860<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/Is_Kris_the_Knight.html">read this article online</a>.</p> 861<p>Is Kris <span style="color: hotpink; font-style: italic;">the Knight</span>? At face value, this seems insane. Right? Well, let's look at the evidence.</p> 862 863<p>First and foremost, <span style="color: hotpink; font-style: italic;">the Knight</span> opens <span style="color: red; font-style: italic;">Dark Fountains</span>. Now, what does Kris do at the end of Chapter 2? They create a <span style="color: red; font-style: italic;">Dark Fountain</span>.</p> 864 865<p>Second, what does Kris look like in <span style="color: red; font-style: italic;">Dark Worlds</span>? That's right, a Knight.</p> 866 867<p><img src="/blog-files/Kris_battle_idle.gif" type="image/gif" width="100" align="left" style="image-rendering:pixelated" alt="Kris, the primary player character from Deltarune, dressed as a knight, minus a helmet." /></p> 868 869<p>This is what Kris looks like in a <span style="color: red; font-style: italic;">Dark World</span>, they're wearing plated armor. They even have a sword.</p> 870 871<p>We know that Kris made a <span style="color: red; font-style: italic;">Dark Fountain</span> at the end of Chapter 2, so is it really that far off to assume that they also made the one in the library's computer lab? Or the on in the closet for that matter. Well, we know that they had their knife at the <a href="https://youtu.be/wBS1MNkVPGw">end of chapter 1</a>, and only Toby Fox knows what they did before chapter 1.<br />In the end of chapter 2, they rips they soul out before creating the new fountain, and shuffling around outside; and slashing Toriel's tires. In fact, they rips out their heart in the end of chapter 1, too. Afterward, they presumably went to library and made a fountain in the computer lab.</p> 872 873<p>This is a really common theory, but it really needs more evidence to be collected, and more speculating to be done.<br clear="left"/></p> 874 875<p><em>Image taken from <a href="https://deltarune.fandom.com/wiki/">Fandom</a>.</em></p> 876 877<p><em>Quick note from 2024: I'm aware of the design of Kris from that rodeo teaser. I'm pretty much keeping this up for historical reasons at this point. Encase you're wondering, here's Kris' design from there:</em></p> 878 879<p><center><img src="/blog-files/yeehowdy.webp" type="image/webp" width="100" style="image-rendering:pixelated" alt="Kris, from Deltarune, dressed up in a cowboy outfit." /></center></p> 880 881</description> 882<guid isPermaLink="false">Is_Kris_the_Knight.html</guid> 883<pubDate>Sat, 23 Oct 2021 00:00:00 GMT</pubDate> 884<atom:published>2021-10-23T00:00:00Z</atom:published> 885<atom:updated>2024-02-21T00:00:00Z</atom:updated> 886</item> 887 888<item> 889<title>Symbols</title> 890<link>https://steve0greatness.github.io/blog/symbols.html</link> 891<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/symbols.txt" /> 892<description> 893<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/symbols.html">read this article online</a>.</p> 894<p>In our lifes on the internet, we see alot of characters that we don't normally see. Like @, #, &amp;, [], {}, \, ;, and |. But what are thier names, what are their origins, and why do they look like they do? I'm going to try and find out!<br />Let's start with what they are used for most of the time on the web.<ol><li>@ is used to mean at. It can also be used to define a username(<span style="font-weight:bold">@</span>user), or even emails(person<span style="font-weight:bold">@</span>emailprovider.topleveldomain)</li><li>The hashtag, #, is used for tagging posts to topics(<span style="font-weight:bold">#</span>NumberOneProgrammer). It is also sometimes used to define a number(<span style="font-weight:bold">#</span>1). It's also used in CSS to define IDs, and in urls to scroll down to a certain part of the page(<span style="font-weight:bold">#</span>theMan).</li><li>&amp; is a symbol used to mean "and"(the dog <span style="font-weight:bold">&amp;</span> the cat). It is also used in urls to be an addition to the search(?q=look%20mom%20no%hands%21<span style="font-weight:bold">&amp;</span>images)</li><li>Square brackets([]), are used to define a list in the most widely used programming language on the web, JavaScript(<span style="font-weight:bold">[</span>"the dog", "the cat", "the bird", "the plane"<span style="font-weight:bold">]</span>). They can also be used in the middle of quotes to give context("Have a nice day!" <span style="font-weight:bold">[</span>The mayor<span style="font-weight:bold">]</span> shouted)</li><li>Curly brackets({}) are used to define a JavaScript object( {person: "Jim", car: "JavaScript car :)"} )</li><li>backslash(\) is used in markdown, and JavaScript strings, to define a character that should remain itself, such as <span style="font-weight:bold">\</span># showing up as a # instead of a heading.</li><li>Semi-collins(;) are used to define the end of a command in lots of programming languages, like JavaScript(alert("hello world")<span style="font-weight:bold">;</span>), PHP(echo "hello world"<span style="font-weight:bold">;</span>)</li><li>|, or Vertical bar, has no <em>real</em> use on the web.</li><li>~, or tilde, also, doesn't find much use</li><li>Grave accents(`) are used to define a multi-lined JavaScript string(<span style="font-weight:bold">`</span>this has<br />2 lines<span style="font-weight:bold">`</span>)</li></ol>Those are what they are, but what about their original meanings?<ol><li>The At-Sign(@) is used to mean at(they're <span style="font-weight:bold">@</span> their house), it could also be used for a price(<span style="font-weight:bold">@</span>10 pence)</li><li>#(pound-sign, hashtag, number-sign, octothorpe, sharp-sign), it's used to mean lb(10 <span style="font-weight:bold">#</span>), define numbers(<span style="font-weight:bold">#</span>10), define a tag in social media(<span style="font-weight:bold">#</span>NumberOneCoder), to define the musical notes that are sharp, or used on telephones to do... something.</li><li>Ampersands(&amp;) are used as &amp;, that's it(doges <span style="font-weight:bold">&amp;</span> golden retrievers).</li><li>[Square Brackets] are used as a way to add context to the middle of a sentence, like "he ate the sausage", but we don't know who "he" is, and what kind of sausage he is eating, so it should be "<span style="font-weight:bold">[the young boy]</span> ate the <span style="font-weight:bold">[cheese filled]</span> sausage"</li><li>{Curly Brackets} don't get much use. They would be used for <span style="font-weight:bold">{</span>defining words, lines, sentences as being in a group<span style="font-weight:bold">}</span>.</li><li>|s are used to define absolute value, like <span style="font-weight:bold">|-2|</span> = 2. It can also be used as a replacement for periods, and forward slashed</li><li>The backslash doesn't get much real use in writing. In math, it is used to represent the set difference(which I won't really explain), such as a<span style="font-weight:bold">\</span>n</li><li>The Semicolon is used to seperate ideas in a sentence filled with commas, add seperation between an explaination<span style="font-weight:bold">;</span> and a seperator(,) in a list, and merge 2 sentences together without a compound(and, but, or). Such as "I am so happy for them, and I am proud" &amp; "I am so happy; I am proud." act the same. If you'd like a better explaination, I'd suggest you to check out <a href="https://youtu.be/th-zyfvwDdI">How to use a semicolon</a> by Ted-Ed, it's a great whatch, and it's presented in an interesting and fun style.</li><li>Grave accents(`) are used in some words from other languages, but not much in English. However it can be used in songs and poems to indicate that silent letters aren't silent.</li><li>Tildes(~) can be used in a sentence to mean about, for example, <span style="font-weight:bold">~</span>10.</li></ol></p> 895 896</description> 897<guid isPermaLink="false">symbols.html</guid> 898<pubDate>Sun, 10 Oct 2021 00:00:00 GMT</pubDate> 899<atom:published>2021-10-10T00:00:00Z</atom:published> 900<atom:updated>2021-10-10T00:00:00Z</atom:updated> 901</item> 902 903<item> 904<title>Creating a HTML drop-down list</title> 905<link>https://steve0greatness.github.io/blog/Creating_HTML_DD_List.html</link> 906<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/Creating_HTML_DD_List.txt" /> 907<description> 908<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/Creating_HTML_DD_List.html">read this article online</a>.</p> 909<p>In order to create a drop-down selection list in HTML, we must first understand why they are important.</p> 910 911<p>Drop-down lists can be used in lots of ways, from creating a way for people to chose from a strict set of options, to making an on-off switch(even though you should use buttons for that).</p> 912 913<p>Before we start, here is an example:</p> 914 915<p><strong>Select Image:</strong> <select id="select" onchange="document.getElementById('img').src = document.getElementById('select').value"><option value="https://upload.wikimedia.org/wikipedia/commons/a/a2/Paul_von_Hindenburg_%281914%29_von_Nicola_Perscheid.jpg" selected="true">Img 1</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Wilfried_Gruhn.jpg/121px-Wilfried_Gruhn.jpg">Img 2</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Blackcap_%28Sylvia_atricapilla%29_male.jpg/129px-Blackcap_%28Sylvia_atricapilla%29_male.jpg">Img 3</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Lt._Gen._Nguy%E1%BB%85n_V%C4%83n_Thi%E1%BB%87u_at_Cam_Ranh_Base%2C_October_26%2C_1966.jpg/116px-Lt._Gen._Nguy%E1%BB%85n_V%C4%83n_Thi%E1%BB%87u_at_Cam_Ranh_Base%2C_October_26%2C_1966.jpg">Img 3</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Steve_Stricker.jpg/157px-Steve_Stricker.jpg">Img 4</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Aegotheles_chrisoptus_-_Catlereigh_Nature_Reserve.jpg/350px-Aegotheles_chrisoptus_-_Catlereigh_Nature_Reserve.jpg">Img 5</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Michael_Whelan_-_Lucca_2017.jpg/118px-Michael_Whelan_-_Lucca_2017.jpg">Img 6</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/St_Pancras_Railway_Station_2012-06-23.jpg/152px-St_Pancras_Railway_Station_2012-06-23.jpg">Img 7</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Mae_La_refugee_camp_TFA.jpg/162px-Mae_La_refugee_camp_TFA.jpg">Img 8</option><option value="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/JimmyCarterPortrait_%28cropped%29.jpg/121px-JimmyCarterPortrait_%28cropped%29.jpg">Img 9</option></select></p> 916 917<p><img id="img" src="https://upload.wikimedia.org/wikipedia/commons/a/a2/Paul_von_Hindenburg_%281914%29_von_Nicola_Perscheid.jpg" style="width: auto; height: 10em;" /></p> 918 919<p><small>Images from <a href="https://en.wikipedia.org">Wikipedia</a>, on <a href="https://web.archive.org/web/20211001135954/https://en.wikipedia.org/wiki/Main_Page">Oct. 2nd</a> &amp; <a href="https://web.archive.org/web/20211002095505/https://en.wikipedia.org/wiki/Main_Page">1st, 2021</a></small></p> 920 921<p>For some weird reason, it's not in <code>&lt;input&gt;</code>, it has it's own tags: <code>&lt;select&gt;</code> and <code>&lt;option&gt;</code>. Using these is a little like making a list, if you've ever made one. Here's an example bit of HTML:</p> 922 923<div class="codehilite"> 924<pre><span></span><code><span class="p">&lt;</span><span class="nt">select</span><span class="p">&gt;</span> 925<span class="p">&lt;</span><span class="nt">option</span><span class="p">&gt;</span>op 1<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> 926<span class="p">&lt;</span><span class="nt">option</span><span class="p">&gt;</span>op 2<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> 927<span class="p">&lt;/</span><span class="nt">select</span><span class="p">&gt;</span> 928</code></pre> 929</div> 930 931<p>Like all <code>input</code>s, <code>select</code> can have an id and name, and like <code>input[type=radio]</code>, <code>option</code> can have a value.</p> 932 933<p>However, you may not know some things that could be useful here, such as defaulting, or making things update upon being changed, well, you can do defaulting with <code>selected</code> in the <code>&lt;option&gt;</code> that you want to be preselected. Changes done the page upon the change of the selection in the drop-down(or anything else that can be changed by the user) is <code>onchange="submitFunction()"</code> being placed in the <code>&lt;select&gt;</code>.</p> 934 935<p>Let's check back on the code that we made at the code example:</p> 936 937<div class="codehilite"> 938<pre><span></span><code><span class="p">&lt;</span><span class="nt">select</span> <span class="na">onchange</span><span class="o">=</span><span class="s">&quot;submitFunction()&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;selection&quot;</span><span class="p">&gt;</span> 939<span class="p">&lt;</span><span class="nt">option</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;op1&quot;</span> <span class="na">selected</span><span class="p">&gt;</span>op 1<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> 940<span class="p">&lt;</span><span class="nt">option</span> <span class="na">value</span><span class="o">=</span><span class="s">&quot;op2&quot;</span><span class="p">&gt;</span>op 2<span class="p">&lt;/</span><span class="nt">option</span><span class="p">&gt;</span> 941<span class="p">&lt;/</span><span class="nt">select</span><span class="p">&gt;</span> 942</code></pre> 943</div> 944 945<p>Inorder to access the selected option with JavaScript, use <code>document.getElementById("selection").value</code>.</p> 946 947<p>That's basically it, feel free to <code>CTRL + C</code> <code>CTRL + V</code> it. /s</p> 948 949</description> 950<guid isPermaLink="false">Creating_HTML_DD_List.html</guid> 951<pubDate>Fri, 01 Oct 2021 00:00:00 GMT</pubDate> 952<atom:published>2021-10-01T00:00:00Z</atom:published> 953<atom:updated>2024-01-26T00:00:00Z</atom:updated> 954</item> 955 956<item> 957<title>YouTube needs to have an open REST API</title> 958<link>https://steve0greatness.github.io/blog/Youtube_needs_a_Rest_API.html</link> 959<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/Youtube_needs_a_Rest_API.txt" /> 960<description> 961<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/Youtube_needs_a_Rest_API.html">read this article online</a>.</p> 962<p><em>2024 Note: I don't care anymore. I'm keeping this around for historical reasons at this point.</em></p> 963 964<p>Youtube needs an open Rest API. Here are some reasons: 9651. It makes my life easier, as I don't need to write a billion lines of code, and not go thought the <strong><em>paid service</em></strong> known as google cloud console, to get an api key. 9662. It means that you only need to use <code>fetch()</code> on it. 9673. We don't need the most in depth api.</p> 968 969</description> 970<guid isPermaLink="false">Youtube_needs_a_Rest_API.html</guid> 971<pubDate>Wed, 29 Sep 2021 00:00:00 GMT</pubDate> 972<atom:published>2021-09-29T00:00:00Z</atom:published> 973<atom:updated>2024-02-02T00:00:00Z</atom:updated> 974</item> 975 976<item> 977<title>How to Make the perfect Tea.</title> 978<link>https://steve0greatness.github.io/blog/How_To_Make_Tea.html</link> 979<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/How_To_Make_Tea.txt" /> 980<description> 981<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/How_To_Make_Tea.html">read this article online</a>.</p> 982<p><em>This post is subjective, there's no <strong>right</strong> answer to "what is the perfect tea."</em></p> 983 984<p>Tea is the perfect fit for most meals, breakfast, 2nd breakfast, morning tea, lunch, afTernoon tea, dinner, or supper.</p> 985 986<p>But how do I make it? Here's how I make my tea.</p> 987 988<h2 id="step-1">Step 1</h2> 989 990<p>The first step is to get the brand of tea you like. I personally like stuff such as Mighty Leaf, it tastes strong, and your able to use it 3 times without it getting weaker, and even then, you can still use it more, it really doesn't lose it's weakness.</p> 991 992<h2 id="step-2">Step 2</h2> 993 994<p>Get a mug, or tea cup. I personally like mugs, as they are normally bigger, meaning you don't have to refill as much as a tea cup.</p> 995 996<h2 id="step-3">Step 3</h2> 997 998<p>Get your tea, if you're using loose leaf, I'd use a smaller cup to make it, then use a strainer to the leaves out, as it adds texture that I don't like personally, otherwise just put the tea bag in, it is at this point that I like to stir it.</p> 999 1000<h2 id="final-step">Final Step</h2> 1001 1002<p>Enjoy.</p> 1003 1004<p>You can add sugar and <s>milk</s> cream, if you're into those kinda things... even lemon if you really want.</p> 1005 1006<p><img src="/blog-files/English_teaware.jpg" type="image/jpeg" width="250" /></p> 1007 1008<p><em>Image source: <a href="https://commons.wikimedia.org/wiki/User:Sgtblackpepper">@Sgtblackpepper@en.wikipedia.org</a>; <a href="https://en.wikipedia.org/wiki/File:English_teaware.jpg">image</a>; Licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC BY-SA 4.0</a>. This upload is not endorsed by the image rights holder.</em></p> 1009 1010</description> 1011<guid isPermaLink="false">How_To_Make_Tea.html</guid> 1012<pubDate>Tue, 28 Sep 2021 00:00:00 GMT</pubDate> 1013<atom:published>2021-09-28T00:00:00Z</atom:published> 1014<atom:updated>2024-02-02T00:00:00Z</atom:updated> 1015</item> 1016 1017<item> 1018<title>Why inspect-element is useful</title> 1019<link>https://steve0greatness.github.io/blog/Why-inspect-element-is-a-useful-tool.html</link> 1020<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/Why-inspect-element-is-a-useful-tool.txt" /> 1021<description> 1022<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/Why-inspect-element-is-a-useful-tool.html">read this article online</a>.</p> 1023<p><div class="notice">This post isn't very good, and I'm not proud of it.</div>So, as of currently, my <a href="https://ocular.jeffalo.net/user/Steve0Greatness">Ocular Status</a> is <span style="font-style: italic; color: #0dbfb7; background-color: #0f0f0f;">Mobile needs a better browser! #MobileSmartBrowser! (Er/Him)</span>. Part of the reason for this is so that inspect can be on mobile.<p>but what makes inspect so important?</p>Well I'm glad I asked!<div>So on GitHub, you only have 2000 actions you can do(on the free plan). So that means you need to use them carefully, make sure that you won't do something that wastes an action.</div>It helps you fix any mistake, before you make anymore. <div>Of course, you can always download the file, and edit it offline. But inspect element is easier, live, and requires less space in your hard-drive.</div>Thanks for coming to my Ted-talk.😜🤪</p> 1024 1025</description> 1026<guid isPermaLink="false">Why-inspect-element-is-a-useful-tool.html</guid> 1027<pubDate>Mon, 17 May 2021 00:00:00 GMT</pubDate> 1028<atom:published>2021-05-17T00:00:00Z</atom:published> 1029<atom:updated>2021-05-17T00:00:00Z</atom:updated> 1030</item> 1031 1032<item> 1033<title>How to Copy and Paste on mobile</title> 1034<link>https://steve0greatness.github.io/blog/How-to-copy-and-paste-on-mobile.html</link> 1035<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/How-to-copy-and-paste-on-mobile.txt" /> 1036<description> 1037<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/How-to-copy-and-paste-on-mobile.html">read this article online</a>.</p> 1038<div class="notice">This post isn't very good, and I'm not proud of it.</div> 1039 1040<p>Recently, I've been seeing a lot of people coming up with one excuse for not linking the duplicate topic in the suggestions forum. They say something like, <q>I'm on mobile!!!!! &#128534;&#128557;&#128555;</q> this is not a correct argument, so I've decided to make this post to prove it.</p> 1041 1042<h2 id="safariios">Safari/iOS</h2> 1043 1044<p>The way that you copy and paste on Safari is by double taping on the text, then dragging until you've selected all the text(the next bit works for links, not this)</p> 1045 1046<h3 id="coping-links">Coping links</h3> 1047 1048<p>Tap and hold on the link until you see:</p> 1049 1050<p><img src="/blog-files/iOS_Copy.jpg" type="image/jpeg" alt="open, open in background, open in new window, download link file, add to reading list, *copy*, share" loading="lazy" width="300" height="242" /></p> 1051 1052<h3 id="paste">Paste</h3> 1053 1054<p>Going to any textbox, in the top-lefT-hand conner, you should see a little clipboard icon(as long as you aren't selecting any text), press it. tap "copy"(circled in red).</p> 1055 1056<h2 id="chromeandroid">Chrome/Android</h2> 1057 1058<p><em>Note: I don't own an android tablet or phone, so take this with a grain of salt</em></p> 1059 1060<p>Press and hold until a few selection boxes come up(might work for links)</p> 1061 1062<p><strong>Chromium</strong></p> 1063 1064<p><img src="/blog-files/Android_Chrome_Copy.png" type="image/png" loading="lazy" width="300" height="551" /></p> 1065 1066<p><strong>Firefox/Gecko</strong></p> 1067 1068<p><img src="/blog-files/Android_Firefox_Copy.png" type="image/png" loading="lazy" width="300" height="289" /></p> 1069 1070<h3 id="pasting">Pasting</h3> 1071 1072<p>Tap and hold on the text box, you should see "paste," now click that(highlighted in red).</p> 1073 1074<p><img src="/blog-files/Android_Paste.png" type="image/png" loading="lazy" width="300" height="115" /></p> 1075 1076<p><small>All images are self-sourced.</small></p> 1077 1078</description> 1079<guid isPermaLink="false">How-to-copy-and-paste-on-mobile.html</guid> 1080<pubDate>Wed, 05 May 2021 00:00:00 GMT</pubDate> 1081<atom:published>2021-05-05T00:00:00Z</atom:published> 1082<atom:updated>2024-01-03T00:00:00Z</atom:updated> 1083</item> 1084 1085<item> 1086<title>How to Make Scratch Mockups</title> 1087<link>https://steve0greatness.github.io/blog/How-To-make-mockups.html</link> 1088<atom:link type="text/plain" rel="alternate" href="https://steve0greatness.github.io/blog/How-To-make-mockups.txt" /> 1089<description> 1090<p>Depending on your Feed reader, you may want to <a href="https://steve0greatness.github.io/blog/How-To-make-mockups.html">read this article online</a>.</p> 1091<p>The first step to making a mockup is to open the <abbr title="Developer Tools"><a href="https://developer.chrome.com/docs/devtools/">DevTools</a></abbr>. This can be done with the keyboard shortcuts <code>ctrl</code> + <code>shift</code> + <code>i</code> or <code>F12</code>.</p> 1092 1093<p>This DevTools menu allows you to do many cool things, such as create new elements, and modify existing ones. In all browsers(that I know of) you can use a little selector at the top-left of the DevTools panel to enable a mode that if you click on an area of the screen, it brings you to the element in question within the DevTools panel.</p> 1094 1095<p>There's not much else advice I can give you. Just look around the Scratch site to get inspiration, and then either create or edit an element on a page you like to fit your needs.</p> 1096 1097</description> 1098<guid isPermaLink="false">How-To-make-mockups.html</guid> 1099<pubDate>Thu, 22 Apr 2021 00:00:00 GMT</pubDate> 1100<atom:published>2021-04-22T00:00:00Z</atom:published> 1101<atom:updated>2024-01-03T00:00:00Z</atom:updated> 1102</item> 1103 1104</channel> 1105 1106</rss>