Porting SAM to Makecode – part 2

Environment setup and first build It quickly became obvious that the web-based Makecode editor was too slow and restrictive to make any real progress. Native development is possible via the PXT command line. However the instructions are full of pitfalls https://makecode.com/cli Firstly dependencies For a Ubuntu 22.04 Next you need to initialise pxt The instructions… Continue reading Porting SAM to Makecode – part 2

Porting SAM to Makecode – part 1

So we bought one of the kids a microbit v2. I was looking around for various extensions and stumbled upon the speech module. https://microbit-micropython.readthedocs.io/en/latest/tutorials/speech.html and tried to use it in Makecode. I quickly realised that although the speech module was written in python and Makecode supports python the similarities end there. It turns out that… Continue reading Porting SAM to Makecode – part 1

Custom refactoring with Eclipse JDT library

Eclipse source code clean-up wizard and other refactoring tools are great, but sometimes they are just not quite powerful enough. For example a large legacy application with 100s of instances of non-standard Java package and class names. These could be cleaned by refactoring each in turn. Additionally Eclipse “update fully qualified names in non-Java text… Continue reading Custom refactoring with Eclipse JDT library

JOGL with Java 17

JOGL 2.3.2 fails on Java 17 with errors such as Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1 at jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:171) There is limited info on this, traced to this nasty chosenGC = Win32SunJDKReflection.graphicsConfigurationGet(device, winConfig.getPixelFormatID()); This relies on reflection on core JDK classes, obviously a no-no from Java 9 onwards, but… Continue reading JOGL with Java 17

Simple minimal install

Refreshing some very old hardware for use with iPlayer etc. Only 2GB RAM and latest Ubuntu is very bloated. Did minimal install from standard desktop ISO which I happened to have on USB key # old school – no display manager, just openbox sudo apt remove gdm3 gvfs cups kerneloops whoopsie modemmanager sudo apt install… Continue reading Simple minimal install

Quick photo tidy up

convert from DCIM conventions to date based… brew install exiftool exiftool ‘-FileName

Published
Categorized as geek

Cesium 3D model translation

If you’re using the primitive API rather than the entity API then you do not have easy access to the orientation parameters. It’s possible to do all this from scratch, but it’s hard work…. var getModelMatrix = function(lon, lat, rotationZ) { // 1) create a translation position matrix var posMat = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(lon, lat)); // 2)… Continue reading Cesium 3D model translation

Install JavaFX Scene Builder 2.0 without local administrator on Windows

Yes, this is possible, by default the javafx_scenebuilder-2_0-windows.msi installs to all users and tries to registry some fonts etc. This can be avoided by running the following command. This will install a link to the Desktop, when it is run Scene Builder will install, just click Ignore on all the warnings about failed font installation.… Continue reading Install JavaFX Scene Builder 2.0 without local administrator on Windows

Published
Categorized as geek

Corrupted mythtv database table [SOLVED]

Started seeing “No seektable” when trying to edit recordings – to set cut points…After investigation turned out the table recordedseek in mythconverg was corrupt. Tried to fix with this but didn’t work. mysqlcheck –databases mythconverg –auto-repair Ended up with this solution. Export database excluding bad table, purge database, rebuild and then replay export file on… Continue reading Corrupted mythtv database table [SOLVED]

Published
Categorized as geek Tagged