-
Getting a count of the rows in all of your ActiveRecord models
Warning: Going through ActiveRecord is likely not something you want to do in production unless you have a replica database that your script or your model can point at. See the second part for MySQL and PostgreSQL examples in SQL. How do you enumerate your models? For apps created under Rails 5 app or later,…
-
Self-Modifying Code on a Commodore VIC-20
Note: All code listings are in lower case so that they are pastable into the VICE emulator. Otherwise, you will get graphics/uppercase PETSCII characters on paste. Examining the structure of how the BASIC code is stored User program RAM is in locations 4096 to 7680 (decimal) on a VIC 20. The storage format of the…
-
Saving your work on the Model 16 in TRSDOS-II and BASIC/BASICG
(This is emulating the Model 16 using the trs80gp emulator and saving/load from virtual disk.) Setting up a fresh disk If you’re already in BASIC, just open another trs80gp emulator to create the new disk first. Insert a new disk by going to Diskette -> :1 <empty> -> <<unformatted dmk>> FORMAT 1 and “Y” when…