Here's how to write a Fibonacci sequence program in Assembly language from scratch for the x86-64 processor. Also includes instructions on how to install the Flat Assembler. Installation First, let's install the Flat Assembler. You can download the program from here: https://flatassembler.net/download.php Doesn't need Windows setup/installation. Simply download the zip file and extract it to [...]
Download a File Using Go
Downloading a file from the Internet using Go is remarkably easy. Especially coupled with concurrency it makes downloading multiple files fast. The following code below shows how to download a single file using Go. Goal: Download a test image file, the Google logohttps://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png First get the file using http.GetExtract the filename from the URL by [...]
Send Email With Go and MailJet
The following steps show how to send mail with Go using the standard smtp package. To test I used MailJet as the mail server but you can also use Mandrill or SendGrid. First let's setup MailJet as the mail server. Then write the Go code and send a test email. MailJet Setup After creating your [...]
Create a Self-signed Certificate on Windows for Local Development
Create an imaginary domain pdb.oak.san with a self-signed certificate that works on major browsers (except Firefox) without generating a warning.
The Definitive 4-Step Short Guide to Implementing WordPress Language Files
WordPress: 5.5.1 The reason to call this post "definitive" is because it contains the exact information (without adding anything extra) for implementing WordPress language files (aka internationalization). The 4-Steps 1. The plugin entry point ".php" file needs the following Text Domain WordPress directive, considering foo-bar as the plugin name: * Text Domain: foo-bar Where is [...]
Getting Started with Phaser 3
A barebones Phaser 3 getting started demo. 5 Easy Steps See the comments in index.html in the Github repo. Include the JS file phaser-arcade-physics.min.jsDeclare the config varCreate a new Phaser.GamePreload the 4 game assets (images) in preloadFoo() functionCreate the game in createFoo() functionadd background imagecreate a particles emittercreate the ball bossattach the emitter to the [...]
Write a list comprehension that finds all the Pythagorean triples for right triangles with sides shorter than 100
Write a list comprehension that finds all the Pythagorean triples for right triangles with sides shorter than 100. A Pythagorean triple is three integers a, b, and c, where a² + b² = c². In Elixir it takes a line of code with pattern-matching to produce this. Note the 3 patterns below, nested loops, scary [...]
Write a function even_length? that uses pattern matching only to return false if the list you pass it has an odd number of elements, true otherwise.
Write a function even_length? that uses pattern matching only to return false if the list you pass it has an odd number of elements, true otherwise. This is a fun little exercise in Elixir. First we match a single item in the list (odd number) which is false. Then match exactly two items (even number) [...]