A nice toy

Casio HR-5; picked it up as a curiosity and maybe for the kids to play with; cost next to nothing. Some corrosion in the battery compartment but a quick file fixed that; put in new batteries and it worked.

scan of the calculator showing its front

Scan of Casio HR-5 — not many buttons!

At first was a bit worried that the printing was a bit faint, but turns out that was the paper not the print head — when I put a strip of good-quality thermal paper in (cut from a fax roll that I knew worked because I’d use it in the cw-16 and EP44), the printing was fine, as shown in the example output included below.

shows an example calculation or two

Example output from Casio HR-5 thermal printing calculator.

Would be nice if it had a few more functions — it’s pretty minimal in that respect — but it’s quite a nice machine, and in near-new condition now the corrosion is gone., It take 38 mm thermal paper (1.5″ if you prefer), which is still available.

It came with a box of 5 unused rolls — I don’t know if they’ll print any better than the one that was in it, but they’re all there in the box. I doubt I’ll ever use them up.

scan of the box front -- says Thermal roll paper TP-38 for Canon calculators 38 mm by 7 m

Box of 5 rolls of paper

All the pictures here are flatbed scans — even those of the machine itself (I just sat it on the scanner). Hence the blurry look. What can I say, I’m lazy.

red with a picture of the machine and some examples of output

The box

And it is only a calculator. Into the cupboard!

Cover says electronic printing calculator calculadora impressora electronica Casio H R 5 operation manual manual de operacion

The cover of the manual — I can scan the whole thing if you like, just let me know

 

Calc

Nightfighter by W.R.Bennett; good, and bad, and bad, and good

A book can be good and bad at once. It can have aspects that command admiration and others that elicit involuntary mirth. A wonderful example of this is Nightfighter by W.R.Bennett. This is, objectively, not a good book. The plot is clunky, the characterisation crude, the prose overblown such that I am going to have to quote a bit of it (see below) and yet… it reads like the author knows something about flying a plane over enemy territory. Winding back the boost, operating the AI set (airborne interception — radar, we would call it now), he knows the minutiae. In the best scenes, despite the purple prose, the book does give a sense of wrestling a complex machine through the sky. Flying a Mosquito or other plane of WWII vintage was not a case of being “at one with the machine” and just hurling it around the sky. Everything was manual, so the pilots and navigators had to have substantial knowledge of the mechanicals, had to be able to adjust air/fuel mixture, not just push on the throttles. And this book captures all that prosaic knowledge. I wonder if a prose artist without the knowledge would be able to capture that sufficiently.

scan of cover

The cover of Nightfighter by W R Bennett.

Brief, flawed, utterly without pretence; quite enjoyable.

Quotes:

, ambition to close the ears of his people to âthe …ing continguity of death, angrily hurling fiery barbs of retaliatively-convulsing objection into sky, vainly attempted to protect its skeletonized remains as the grumbling procession of ghouls came on to claim the last fetid pieces of flesh from its scarified bones.

Not sevenfold, not terrible vengeance, but it would go on. This was war, the price of one man’s™ Machiavellian crime, paid for in grisly and horrifying currency. Human lives, mutilated bodies, agonized souls and distorted minds — irredeemable, these, all uselessly sacrificed on the cruel altar of a maniac’s desires for world conquest and an unholy ambition to close the ears of his people to the teachings of God.

The wind-whipped silence in the cockpit was eerie and weirdly primed with ominousness.

I like it

Your computer was locked — scam

This scam came up on Firefox running on Linux:

Says ** YOUR COMPUTER WAS LOCKED ** and Error # DT00X02. and other lies

The screen presented by this scam

I got a dialogue box saying:

http://officebazars.club is requesting your username and password. The site says: “Suspicious activity detected on your IP address due to harmful virus installed in your computer. Call Toll Free now +61-1800-235-946 for any assistan…”

Nasty little people behind this. The full text is:

** YOUR COMPUTER WAS LOCKED **

Error # DT00X02.

Call Microsoft Technical Suppport:
+61-1800-235-946(Toll-Free)
Do Not Ignore This Important Warning
If you close this page without resolving issue, access to your computer will be disabled to prevent further damage to our network.Your computer has alerted us that it was infected with virus and spyware. The following data is at risk:1. Facebook Login
2. Credit Card Information
3. Email Credentials
4. Browsing History and Data

You must contact us immediately so our engineers can guide you through the recovery process by phone. Please call us within the next 5 minutes to prevent complete loss of your computer.

Contact Microsoft Engineer: +61-1800-235-946 (Toll-Free)

x

Security Warning:

** YOUR COMPUTER WAS LOCKED **

Error # DT00X2.

Call Microsoft Technical Support at: +61-1800-235-946(Toll-Free)

Do Not Ignore This Important Warning
If you close this page without resolving issue, access to your computer will be disabled to prevent further damage to our network.

Your computer has alerted us that it was infected with virus and spyware. The following data is at risk:

1. Facebook Login
2. Credit Card Information
3. Email Credentials
4. Browsing History and Data

You must contact us immediately so our engineers can guide you through the recovery process by phone. Please call us within the next 5 minutes to prevent complete loss of your computer.

Contact Microsoft Engineer:+61-1800-235-946(Toll-Free)

Prevent this page from creating additional dialogues. sereno

Other scams

Floppy!

Note to self

The floppy drive was not working on my Debian 5.0 install on my AlphaSever 1200! (All the latest technology.) To get it to work:

$ su

# modprobe floppy

OK, now I can see it. Make it appear on boot.

# cat /etc/modules

it’s not there

add it

# vim /etc/modules

# exit
$ cat /etc/modules 
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

loop
floppy

Copy to/from it works better from the command line than the GUI, but it works fine.

Seems OK.

linkcolor option in the hyperref package

Use of the linkcolor option in the very useful LaTeX hyperref package posed some odd behaviour, though nothing unfixable.

In the snippet below, the two \usepackage commands both work, but linkcolor=. throws an error when combined with colorlinks=true

\documentclass{article}
\usepackage[colorlinks=true,linkcolor=]{hyperref}
%\usepackage[linkcolor=.]{hyperref}
\begin{document}
See Figure~\ref{fig}
\begin{figure}
\caption{This is an empty figure \label{fig}}
\end{figure}
\end{document}

If I use the line

\usepackage[colorlinks=true,linkcolor=.]{hyperref}

(note the dot), I get error text:

! LaTeX Error: Undefined color `.'

and the error comes immediately after the closing brace of \ref{}.

The effect I wanted to achieve was to remove boxes around links and leave all links text color except actual URLs, so when I used this command I also had urlcolor=blue in the options, but that was not needed to reproduce the error. But the following line did work, in that all links but URLs were invisible:

\usepackage[colorlinks=true,urlcolor=blue,linkcolor=]{hyperref}

(I’m using MiKTeX-pdfTeX 2.9.6959 (1.40.20) (MiKTeX 2.9.6960) on Windows 10)

From advice received, it seems the thing to do is either remove the boxes by setting their linewidth to zero (which is the most efficient solution), which I would never have thought of, or load the xcolor package before loading hyperref. The basic issue is that the use of the dot is an xcolor thing.

Wherever you go, there you are

Removing unused styles from a Word document

I want to automatically delete all the unused styles from a Word document. There are macros and suchlike for this, but there is also a quick and simple solution. The magic is noted at this page, but it is so useful I want my own copy!

screenshot of the advice

Good advice

I tried it, and it worked a treat. I created an empty document, selected all of the original document but the very final paragraph mark, and pasted it into the blank.

Only styles that were actually used came across — as shown by an almost-empty Styles pane.

screenshot

Left — Styles pane of original document. Right — that of document after pasting

Once the unused styles were gone, I could attach our custom template and style the file much more quickly than if I had had to sort through all those styles.

Thanks, Stefan!

 

Style.

Slackware 14.2 on VirtualBox 6 on Windows 10 host: how an ignoramus does it eventually

Note

The main issue here was guest additions, which allow shared folders and suchlike. They worked with the installed system, but not once I had updated to the 4.4.172 kernel. There seems to be an issue with that. It will be resolved I’m sure but has not been resolved yet. See step 116 below!

I found Slackware to be far less daunting than some comments on the web would suggest. As long as the user is OK with using a text-based disk partitioner (cfdisk), it’s quite straightforward. And with tools like slackpkg and sbotools, maintenance (install, remove and upgrade packages) is not a problem either, and the range of packages is good, although split between the Slackware repository and the stuff curated at slackbuilds.

Indeed, I think you could make a good case that the split has significant benefits — for example, an application built via slackbuilds is compiled natively on and for your system, which can/may/might give performance benefits. (https://www.linuxquestions.org/questions/slackware-14/how-to-set-slackbuild-cflags-cxxflags-qmake-c-cxx-flags-globally-4175621306/) See also the documents for sbotools for globally setting the -j option to speed compiling.

I tried to put in all the steps, but I might have missed out a detail. If so — sorry!

Introduction

I need to test some eLearning I’ve written on a variety of browsers and environments. I’ve tried the big 3 (Firefox, Chrome, Edge) on the Windows 10 machine on my desk. I want to try Linux. So I’m going to set up VirtualBox and install a distro. I’m sure there will be nothing of interest here, but if I am going to do the task I might as well record the steps.

I make a lot of dumb mistakes as I go, and I should probably read the docs more carefully, but this below is the truth of it!

The many steps

      1. Install VirtualBox on my Windows host machine: Went to https://www.virtualbox.org/wiki/Downloads and hit the big download button.
      2. Clicked on ‘Windows hosts’ and wait for the download. Ran the download.
      3. Clicked ‘Next >’
      4. Clicked ‘Next >’
      5. Unchecked creation of desktop shortcut and Quick Launch Bar icon — I don’t want that clutter.
      6. ‘Next >’
      7. Yes
      8. Clicked through the installer. Watch it go!
      9. Choose a Linux distribution: What distro shall we use? Try Slackware.
      10. In a Cygwin window: $ wget https://ftp.yzu.edu.tw/Linux/Slackware/slackware-iso/slackware-14.2-iso/slackware-14.2-install-dvd.iso
      11. check md5sum ($ md5sum slackware-14.2-install-dvd.iso) — looks good.
      12. Create the virtual machine: So began by starting VirtualBox and creating a new machine. (New; Name: Slack, Type: Linux 32-bit; Other 32-bit.
      13. 1GB RAM
      14. Defaults until set virtual hard disk size; chose 12GB.
      15. System → Processor → enable PAE/NX
      16. Boot the VM: Storage → Empty → Optical Driver → Choose virtual optical disk file
      17. Double-clicked to boot
      18. Hit Enter at ‘boot’ prompt
      19. Enter to select default keyboard map
      20. Log in as root
      21. Partition the disk: cfdisk
      22. Select dos partition
      23. New
      24. Set to 11G (later repeated this with 40GB)
      25. Set Type to Linux filesystem
      26. Highlight ‘Free space’
      27. New, remaining space (1023M)
      28. Set Type to Linux swap
      29. Write to disk — yes!
      30. Quit
      31. Set up Slackware: Ran setup
      32. Add swap (/dev/sda2) and accept defaults
      33. Select root partition (/dev/sda1)
      34. Quick format
      35. ext4 file system
      36. Source media selection — use Slackware CD or DVD
      37. auto
      38. Choose what to install — I left defaults
      39. full install
      40. watch it go
      41. Skip making USB boot stick
      42. simple (Try to install LILO automatically)
      43. standard console
      44. no kernel parameters
      45. no for UTF-8 console
      46. Install LILO to MBR
      47. Select USB mouse (not sure about this)
      48. Add gpm (I use it)
      49. Hostname
      50. Domain
      51. Choose Autoconfigure using NetworkManager
      52. Boot time services … accept defaults
      53. Not interested in custom screen fonts
      54. Hardware clock
      55. Time zone
      56. Choose window manager (KDE will do for now)
      57. Root password
      58. It’s not taking keyboard input! I cannot set root password!
      59. Use the VB menu to send Ctrl+Alt+Del to the virtual machine
      60. It captured my mouse and does not respond to the keyboard! I can’t do anything!
      61. Unplugged and replugged keyboard and got it back!
      62. Repeated the install
      63. Turn off/exit install
      64. The first boot from the virtual hard drive: Remove the virtual DVD and reboot
      65. Enter to boot
      66. Log in as root
      67. Add a user: Ran adduser
      68. Enter through most options, but add them to most groups (up arrow at the ‘Or press the UP arrow’ prompt)
      69. VirtualBox guest additions: Still as root, click on Devices menu and Insert Guest Additions
      70. Could not find it user /mnt or /media (turns out it is under ‘/run‘ or something)
      71. Ran # startx
      72. Launch the file manager and there it is ‘VBox_GAs_6.0.4’
      73. Run VBoxLinuxAdditions.run
      74. Seems good.
      75. Shut down the VM
      76. In the VB manager, chose Shared Folders
      77. Clicked the ‘Add folder’ icon — little folder with a green plus on it
      78. Click on Folder Path and Other and browse to the desired folder on the host
      79. I set it as Read-only since I am testing some files and do not want to change them
      80. Clicked Auto-mount ‘on’
      81. Put ‘tests’ in the ‘Mount point’ box — this is a change to the interface, and I think I misunderstood it — should have read the docs!
      82. OK
      83. Rebooted the guest and logged in again
      84. As regular user, got output of id -u (1000) and id -g (100)
      85. As superuser, in the guest:
      86. # mount -t vboxsf -o uid=1000,gid=100 tests /home/username/shareslack
      87. ‘Protocol error’ — uh oh
      88. Reinstalled guest additions
      89. as root, # usermod -a -G vboxsf username
      90. # mount -t vboxsf -o uid=1000,gid=100 tests /home/username/shareslack
      91. Turn off automount and make permanent and Read only and reboot the guest
      92. Turn on automount and read only and reboot
      93. Nope. This is proving a real problem
      94. Simplify the path to the host folder I want to share —  a simple directory off C:
      95. Nope.
      96. I got myself tied in knots here. Start again.
      97. Shared folders — give it a name but no mount point and turn on Auto-mount
      98. Well, at some point the shared folder turned up under /media/sf_username. Not quite sure how, to be honest, but there it is
      99. Opened command prompt and switched to superuser (su command). Now update the system
      100. # vim /etc/slackpkg/mirrors and uncomment the one I want
      101. # slackpkg update
      102. # slackpkg install-new
      103. # slackpkg upgrade-all
      104. Boy, that was easy.
      105. Well, it seems pretty much set up now. Though the screen is not scalable. Check the log from compiling the additions
      106. Log says kernel config is invalid! Odd.
      107. 4.4.172 kernel does not play nicely with guest additions. https://slackblogs.blogspot.com/2019/02/kernel-44172-breaking-some-application.html
      108. Slackbuilds: Oh well. Use links to download the slackbuild files for sbotools, and install that to automate slackbuilds.
      109. Go to https://slackbuilds.org and search for sbotools. Download the build script and the source code and follow the instructions …
      110. See https://slackbuilds.org/howto/
      111. # sbosnap fetch
      112. # sboinstall --reinstall dkms
      113. groupadd -g 215 vboxusers
      114. # usermod -a -G vboxusers username (for root and my user)
      115. logout and back in again
      116. To get the guest additions to compile on the 4.4.172 kernel
      117. edit /etc/fstab and uncomment the cdrom line (so I can do this without gui); then Devices menu and insert guest additions CD
      118. # mount /dev/cdrom
      119. #cd /mnt/cdrom
      120. Try the install: #sh VBoxLinux ...etc...run
      121. Nope, something went wrong  — it just won’t work
      122. It looks like this is not my fault! https://slackblogs.blogspot.com/2019/02/kernel-44172-breaking-some-application.html. It gives a fix
      123. Mount the GA CD and try to run it
      124.  find / -name memobj-r0drv-linux.c
      125. Go there and make the changes shown at the link
      126. but vboxconfig is not in sbin! It is nowhere!
      127. Lower down the same post, though, it says:
      128. PetslackSaturday, 06 April, 2019
        
        The same path here for me (slack64-14.2 + virtualbox-6.0.4) and the patch worked.
        
        Here the steps:
        # apply the patch
        sed -i "s/4, 9, 0/4, 4, 168/" /opt/VBoxGuestAdditions-6.0.4/src/vboxguest-6.0.4/vboxguest/r0drv/linux/memobj-r0drv-linux.c
        
        # build the modules
        /sbin/rcvboxadd setup
        
        #test it without rebooting
        /usr/bin/VBoxClient-all
      129. And rcvboxadd is present, so try that
      130. Seems to have worked! Try a reboot
      131. Login as user and startx
      132. Autoresize guest display is not greyed out. How about shared folders? Yep. Clipboard — yep. That’s most of what I need.

        Screen shot; folder path is c drive backslash users backslash user name, folder name is Darren and auto mount and make permanent are checked

        Shared folder settings; some magic occurs

      133. Shared folders found under /media/sf_darren, which will do!
      134. OK, so at last we are done, or done enough, at least.

Last thing I did was make a Windows batch file and put it in my path:

C:\>type c:\Users\username\bin\slack.bat
"c:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm  Slack

And got a little icon and put a shortcut to the batch file on my desktop. So no need to run the VirtualBox GUI manager.

So I can’t pretend I did it all with complete mastery, but it works, more or less.

There you go.

Scam warning: win an iPhoneX — or not

Just a word of warning, as if anyone needs it these days …

If you get a pop-up on your browser offering you an iPhone if you just answer some questions or whatever, probably you should ignore it..

Basically, they will lead you down a rabbit hole. First a few survey questions — so there’s data harvesting. Dates of birth, email addresses, physical addresses. Are you a home owner? Do you want a coffee machine?

Then they’ll tell you they’ve reserved your phone and there’s just a few more steps.

More data gathering.

Now, ring this number — it will be one of those ones that costs about $4 per minute. They’ll keep you on the line answering questions and quizzes, (“…please stay on the line…”)all the time the fees piling up.

Then you’ll find out the higher you score in the quiz, the better the chance you have of winning a phone:

A participant with the most points in a single call session has a chance on winning the promoted prize or the preferred equivalent value in cash.

So even if you ‘win’ the session, you still only ‘have a chance’ of the big prize; and a ‘chance on’, which is not very gud Inglish, I fink.

Needless to say, it’s probably not a good idea to join in.

You have been warned.

Selectric II: The whale has landed

$5 at a recycling place, state unknown but grubby. Heavy. Wide. Frighteningly complicated.

Useful: http://www.textfiles.com/bitsavers/pdf/ibm/typewriter/selectric/Troubleshooting_The_IBM_Selectric_Typewriter.pdf

OCRed this manual by converting to ppm files and running Tesseract:

$ pdftoppm -r 300 Troubleshooting_The_IBM_Selectric_Typewriter.pdf OCR
$ for f in OCR_???.ppm ; do tesseract $f $f ; done
$ cat OCR_???.ppm.txt > OCR-manual.txt
$ rm OCR_???.ppm*

Serial number is 900163664. The 90 means the Wangaratta factory in Victoria, Australia. After than, dunno. It’s a very wide Selectric II, says model 82 on the bottom, has correcting tape, 10/12 pitch, so pretty standard configuration for the mid-70s.

Dirty. At first the print head would not move. The machine just needed a clean and a careful oil.

Works pretty well. Erasing tape used up, but typing film nearly unused. Backspace is not reliable, but I’m working on that. Not sure how to sort it out. Express backspace works, but regular backspace works when the mainspring is removed (ie when it does not have to fight against the mainspring) but when the mainspring is attached and supplies enough tension for reliable forward spacing, back spacing no longer works — there is no ‘sweet spot’ where the tension is strong enough to make it space but weak enough for the backspace pawl to work against it successfully…. still. The manual above has some useful drawings in it. If I can spare the time…

One can certainly see how sharp and even the type is. Like a laser printer. The font is pretty lifeless, but the crispness is undeniable. It’s easy to see how once the Selectric came along other machines seemed prehistoric (if a lot cheaper, and, I suspect, easier to maintain).

scan of type

Selectric Courier 12 type specimen

Assorted pictures follow.

Photo of green selectric 2

The unit with the lid up

 

Close up of the IBM logo

 

Photo of the print head

The film tape ribbon thingy — mostly unused; correction tape absent

 

Photo of removed mainspring

The main spring, removed and on the bench — not that it helped. Backspace worked with it out, but forward space did not…

 

Another picture

The mainspring still in the machine, bent capacitor bracket in front

 

General view of the thing

 

IBM saticker on the bottom of the unit; says Model 82, IBM Australia, Wangaratta

Sticker on the bottom — Model 82

IBM