Skip to main content

Posts

Grumble, grumble... A post vanished in an instant while I was in the process of adding a comment... thank you, Anonymous, your suggested bitmap changes have been integrated. /* * display text using a 5x7 bitmap font in ASCII letters */ static unsigned char font [] [5] = { { 0x00,0x00,0x00,0x00,0x00 }, // 0x20 32 { 0x00,0x00,0x6f,0x00,0x00 }, // ! 0x21 33 { 0x00,0x07,0x00,0x07,0x00 }, // " 0x22 34 { 0x14,0x7f,0x14,0x7f,0x14 }, // # 0x23 35 // { 0x00,0x07,0x04,0x1e,0x00 }, // $ 0x24 36 { 0x2e,0x2a,0xff,0x2a,0x3a }, // $ 0x24 36 { 0x23,0x13,0x08,0x64,0x62 }, // % 0x25 37 { 0x36,0x49,0x56,0x20,0x50 }, // & 0x26 38 { 0x00,0x00,0x07,0x00,0x00 }, // ' 0x27 39 { 0x00,0x1c,0x22,0x41,0x00 }, // ( 0x28 40 { 0x00,0x41,0x22,0x1c,0x00 }, // ) 0x29 41 { 0x14,0x08,0x3e,0x08,0x14 }, // * 0x2a 42 { 0x08,0x08,0x3e,0x08,0x08 }, // + 0x2b 43 { 0x00,0x50...

On the way in from Mount Barker...

...I ran across a few distractions, a glimpse of which is/are included here: Much else there & in Barker, had a chat to the postal pixies, apparently they’ve had another Mt Barker 6324 postie actually come in & work there before. All day transport ticket here is $3.80 rather than $3.20, much of a muchness.

5x7 text dot-matrix in five minutes...

This is a fairly primitive toy I threw together today for a specific purpose, published in case it’s any use to others... feed it a list of words as command arguments, which it will then display as a 5x7 ASCII dotmatrix with ‘#’ as a dot & ‘_’ as a blank. /* * display text using a 5x7 bitmap font in ASCII letters */ static unsigned char font [] [5] = { { 0x00,0x00,0x00,0x00,0x00 }, // 0x20 32 { 0x00,0x00,0x6f,0x00,0x00 }, // ! 0x21 33 { 0x00,0x07,0x00,0x07,0x00 }, // " 0x22 34 { 0x14,0x7f,0x14,0x7f,0x14 }, // # 0x23 35 { 0x00,0x07,0x04,0x1e,0x00 }, // $ 0x24 36 { 0x23,0x13,0x08,0x64,0x62 }, // % 0x25 37 { 0x36,0x49,0x56,0x20,0x50 }, // & 0x26 38 { 0x00,0x00,0x07,0x00,0x00 }, // ' 0x27 39 { 0x00,0x1c,0x22,0x41,0x00 }, // ( 0x28 40 { 0x00,0x41,0x22,0x1c,0x00 }, // ) 0x29 41 { 0x14,0x08,0x3e,0x08,0x14 }, // * 0x2a 42 { 0x08,0x08,0x3e,0x08,0x08 }, ...

...more history...

I’m pleased to note that you can lose your Internet connection partway through upgrading Oneiric Ocelot Kubuntu to Precise Pangolin at the point where the GUI doesn’t actually work, then reboot it into text mode (RunLevel 1), bring up a network connection by hand, apt-get upgrade then hand-install the numerous things it held back on... ( dpkg does an interactive dance routine a few times, catching up on half-done things) & it all works! Better than that, the final recompile of dvdauthor is not suffering the lack-of-menu-backgrounds in the final product when invoked via devede which several previous versions did.

Geekness is heritable

This realisation came last Friday when my 11yo daughter took 394 fairly good photographs in under 43 minutes, mostly on the AirWalk near the Huon River. Her interest then turned to jumping at exactly the right pace (on the end of the walkway pictured above) to cause adult tourists (on the more stable sections) to grip the handrails fearfully as her 40kg got the whole thing oscillating in a matter of seconds. Not as overt as her brother’s technicality, yet the source is obvious.

The terror of “almost”

I faced an ancient program this week, written in C ( gcc dialect, thankfully), which had a nice, neat, universal association between struct definitions & file-handles, another between the filenames of the files containing those structures (no ISAM here, only flat files) & file-handles... almost. Of maybe 60 structures, manual exceptions would be required for about 7 of them. Of maybe 80 filenames, manual exceptions would be required for about 13 of them. One needs to invent mythical file-handles to make the connection, where no “natural” connection exists. Factor that out for approximately 91 combinations, & no simple diagnostics for any of them. This is akin to Wiley Coyote watching the dust clear mid-pursuit... to discover that he’s almost standing on the edge of the canyon (queue whistling noise, dense <thud>). This association has to be definitively made in order to export the data into a database format which is actually useful. At that point, this prog...

Visual reps of encryption codes can be...

...unusual. $ ssh -Cp2222 $HOSTNAME Host key fingerprint is 77:56:7a:9c:d5:7e:9f:e0:79:74:2d:18:ce:0f:0f:c2 +--[ RSA 2048]----+ |                 | |                .| |            . . o| |         . o * +.| |        S E X.=.=| |         . +.*+.=| |             ooo.| |              .  | |                 | +-----------------+ user@$HOSTNAME's password:

Software nesting

I’m currently amidst solving problems with a PERL script designed to send PDF-containing emails as faxes. Apparently, the command it invokes uses pdftk (which is a C wrapper around a Java library named iText ) to translate each PDF into an image (or images) to send. Pre-processing the PDFs with figjam , another set of PERL scripts working through LaTeX, reduced the damage in that the PDFs are correctly oriented so that pdftk only elides a little over a cm about 1 / 3 of the way along each page. Up to that point, most of the page would be blank. The simplest way to send flawless PDFs seems to be disassembling the email into PDF components, then butcheing the PERL script to use ImageMagick’s convert command to turn each PDF into a set of TIFFs, then send those unaltered through HylaFax’s sendfax module (HylaFax is a set of C++ modules). I really appreciate the “software Lego™”approach of Unix (in this case Linux), in that all of the pieces are included, so replacing one chunk ...

What do you do with it all?

Despite being a member of a group which reckons that the ideal situation is to own nothing yet to control everything , the financial adviser to a certain member of royalty is the second-wealthiest individual in the world. Their personal nett worth is four hundred trillion (4E14) dollars. If you spent that all on brass pins (as used in pin-up boards) at one pin for a dollar, the mass of your collection would roughly equal 2½ million of RMS Queen Mary 2, the world’s largest ocean liner. You wouldn’t deposit that in a bank, you would buy several countries with it (banks included). You (or I) cannot even comprehend that large a number, let alone how much money it represents, let alone spend it (if an average Australian citizen spent $150,000.00 every second , 24x7, from the instant they were born, they would not be able to spend it all in their lifetime). Inequality? Just a little... yet getting angry about it would be the very last thing you would do, as that would make you...

Problem? What problem?

Company acquires new PC from OfficeWorks for $388.00. PC includes MS-Windows 7 Home Edition. Company requires PC to use MS-Windows XP. No problem. Push in Windows XP Black Edition CD, reboot PC, tell BIOS to boot from disc. Installer bluescreens before asking any questions. Bummer! Push in a Kubuntu Oneiric Ocelot DVD, reboot. Fully functional PC five minutes later, set to auto log in. Now select VirtualBox in the packages installer, & install. Start VirtualBox. Add an XP instance. Push in XP Black Edition CD, installer works flawlessly. Add icon to desktop, including the option --fullscreen . Duplicate the windowsXPblack virtual disk file, mark the duplicate as read-only for the user. From now on, user presses power button. Uses all facilities under Kubuntu. If they desperately need the MS-Windows XP feel, they double-click an icon, & 30 seconds later are facing XP. By tapping a LeftCtrl-S they can save a complete screenshot of whatever they're doing ...

Just as you get to thinking...

...that everything worthwhile has been invented, a new way is discovered of producing constructive results when adult stem cells are deployed against 72 different diseases (so far). Eddie doesn't miss many tricks, & seems to have hit on a brilliant way to improve your health... so... do what I'm doing — take a good, long, hard look at what has a 90-year-old bloke so interested in longevity.

There is more than one way to skin a printer

Issue: reinstalling MSWinXP on a workstation, driver to operate hp 1022n printer over the LAN required, staff don’t know if the printer arrived with a disc — & if it did, have no clue where it would be. Remedy, download 2MB driver file (.EXE) from hp, run it. “Turn the device on & plug it into the USB socket.” Oops. [Cancel] Consider downloading the 370MB full driver suite over a slowish ADSL link with limited quota. Hmmm. Try adding a printer anyhow (after defining a TCP port on 192.168.42.25) in case a LaserJet II or the like is close enough to start with, discover that the EXE had installed a 1022 driver anyhow. Wow! It’d accidentally done something useful!

Tethering an AmaySIMmed phone on Linux

Tethering one’s Nokia E5 to take advantage of the 4GB of Internet traffic included in AmaySIM’s $39.90 plan (for 30 days) is quite simple, once all of the knowledge is in place. Switch your phone to “PC Suite” mode... Press [Menu] Select [Ctrl. Panel] Select [Settings] Select [Connection] Select [USB] Select [PC Suite] Select [OK] Select [Back] until Menu closes ...at which point a serial device appears when you plug it into your PC (in this case, a laptop running Natty Narhal Kubuntu) at /dev/ttyACM0 . Now follow AmaySIM’s instructions: Press [Menu] Select [Ctrl. Panel] Select [Settings] Select [Connection] Select [Destinations] Select [Access point] Press [No] Select [Packet data] Enter amaysim Internet and press [OK] Select [Internet] as the destination Select [Internet] Highlight [Optus Internet], press [Options] and select [Edit] Ensure Data bearer is set to [Packet Data] Select [Access point name] Enter or change to interne...
Problem: download a stack of MP3 files listed in a web page. Solution: SaveAs the web page (as music.html ) then... for x in $(gawk '-F"' '/\.mp3"/ { print $10; }' music.html); do wget -c $x done Hit the Enter key, wait about 3 minutes, all finished. Yay! Software as a toy!

Unravelling layers of issues

We have two copies of an app, one running on SCO Unix, the modified version running on Linux. The SCO version depends upon the num-pad sending «esc»OS , however putting PuTTY into NumPad mode means all of the numpad keys send «esc» whatever so are useless for keying numbers (yes, I could remap them, in the Linux version, however a few features have not yet been ported enough to swap versions yet), so... Run PuTTY in numpad mode, download KeyTweak , remap the numpad keys to non-numpad keys, all functional!

Digital playing blocks, a positive consequence

One required feature (limiting the width of table columns, requiring the use of CSS) was/is absent from htmldoc v1.8*, however CSS support will be present in 1.90 when it’s released, so... use SVN to download the source, compile... it almost does what’s needed. A bit of debugging (of others’ code), a bit of editing, my name up in lights, & presently that digital plastic block will be precisely the correct shape for the job at hand — & still respect the HTML4 standards to the letter. Having the code written (in part) by the people who will be using it works extremely well, as an individual (myself, in this case) can focus on one or a few small details to refine the result to perfectly fit their needs, however the overall designers, heavy-code implementers can stick to principles, get the big things correct, & not worry over-much about each tiny detail.