random thoughts to oil the mind

Tag: Software Page 1 of 2

Windows 10 Home/Pro

I recently gave my machine a long overdue brain transplant, but stupidly didn’t consider what would happen to my Windows 10 licence after making a major change to the hardware. Of course, upon booting back up I was greeted with the friendly warning that my OS installation had not yet been activated.

While it is possible to reactivate Windows after a hardware change, this relies on you having linked the licence to your Microsoft account, which I hadn’t done beforehand. Various attempts to troubleshoot the problem just had me going around in circles navigating the same help pages from different angles (“have you tried turning it off and on again?”) And as tempting as it sounded to spend another evening elbow-deep in transistors restoring the status quo ante, there’d be no guarantee that my copy would be activated again with the original hardware in place (anyone know if this is the case?)

So the only option was to buy a new licence. I was a bit loath to fork over the full price for a license from Microsoft, given that I’d only lost my original one through stupidity. But there are plenty of third parties selling licenses for throwaway prices, which are presumably legitimate for at least some value of legitimate. Off I go and basket up a Microsoft Windows 10 Pro licence for a reasonable price, wait with baited breath for a licence code, plug in the numbers and… it failed.

It was then that I noticed I had Windows 10 Home installed but had actually bought a licence for Windows 10 Pro. Fine, it should be possible to upgrade Home to Pro using my licence without having to install fresh, right?

Apparently not. After a few attempts at entering my key while trying to install Windows 10 Pro, I searched around and found various websites supplying generic keys for installing whichever version of Windows you prefer. Unfortunately, entering one of these keys would initially tell me my copy would be upgraded, before complaining that my version of Windows wasn’t activated, but would I like to troubleshoot my problem again?

Fortunately, there was a simple low-tech way out of this particular Catch-22. The solution was to cut the internet connection after entering the generic code for upgrading to Windows 10 Pro. The upgrader moaned a bit, but otherwise did its thing. Once the system was rebooted, I could then enter the licence key I’d purchased and boom. Back to having a fully licensed copy with no more annoying watermarks. Troubleshooters be damned.

[Photo by Tadas Sar on Unsplash]

Migrating phpBB to NodeBB

I recently set about migrating an aging phpBB forum to NodeBB and ran into enough problems that I considered cancelling the whole project.

The phpBB exporter script has been updated various times, and I managed to find a fork which appears to work with phpBB 3.2. Unfortunately, it refused to install itself correctly and appeared to land in the wrong directory, so I had to manually clone the Github project into the expected subdirectory.

And bingo! The import worked, and after disabling/deleting unnecessary plugins and updating NodeBB to the latest branch, the majority of things were working as expected. A few things remain to be fixed, in particular navigating mongodb’s structure to perform a few custom replacements where the import script had trouble deciphering bbcode.

Fortunately StackOverflow provided a good start:

var bulk = db.getCollection('objects').initializeUnorderedBulkOp();
var count = 0;
db.getCollection('objects').find({$and: [{_key:{$regex: /^post:\d+$/}}, {content: {$regex: /<size size="150">(.*?)<\/size>/}}]}).forEach(function(entry){
    var newContent = entry.content.replace(/^<size size="150">(.*?)<\/size>/gm, "## $1");
    print(newContent);
    bulk.find( { _key: entry._key } ).updateOne( { 
        $set: { 'content': newContent } 
    });
    count++;
    if (count % 100 === 0) {
        // Execute per 100 operations and re-init
        bulk.execute();
        bulk = db.getCollection('objects').initializeUnorderedBulkOp();
        count = 0;
    }
})

// Clean up queue
if (count > 0)  bulk.execute();

Using this I was able to find and replace those tags which had been missed and replace them with valid markdown.

[Photo by Kobu Agency on Unsplash]

Daily Links

The Innovation Station – A miscellany of videos on a wide variety of innovative topics, ranging from 3D printing to virtual reality.

Gender Shifts in American Baby Names – An interesting study of the gender flips some names undergo over the generations. Would be interesting to see if patterns can be found in the shifts, maybe tendencies for certain underlying phonetic elements to shift in gender?

Deep Sea Fish – The stuff of nightmares? Photos of some catches from the depths of the Arctic circle. [Deu/Rus]

Ultimate P2P Backup Software – If I knew my arse from my elbow, this’d be one of those projects I’d love to tackle in my spare time. I used CrashPlan until recently, and finding a replacement backup solution has been something of a nightmare. Anyone volunteering to please write this?

Gank, To Steal – Interesting chat about the verb ‘to gank’ on A Way with Words. Only ever previously heard it in a MOBA context, it seems it has a much earlier meaning (as seen in hip-hop).

[Photo by David Clode on Unsplash]

Ein kleiner Kniff für die Qualitätssicherung bei memoQ

This post is also available in English.

Die Übersetzungssoftware memoQ verfügt über eine nützliche Funktion als teil des QA-Checks, wodurch in der Zielsprache nach verdoppelten Wörtern geprüft wird. In meinem Fall hat es schon mehrmals auf kleine Tippfehler hingewiesen, wo ich versehentlich ein „and and“ oder ein „to to“ geschrieben habe. Dennoch bleibt der Vorteil dieses Checks etwas eingeschränkt, wenn man in seiner Sprache regelmäßig solche Formen hat, die diese Verdoppelung verlangen. Im Deutschen denkt man an Sätze, die die Wörter „die die“ verlangen. Der französische Übersetzer wiederum rauft sich die Haare, als ihm memoQ zum zigsten Mal ein „nous nous“ ankreidet.

Doch mithilfe der relativ neu eingebauten Regex-Funktion kann man dieses Problem tatsächlich beheben. Editiert man seinen Regelsatz für die Qualitätssicherung, kann man den Standardcheck unter dem Konsistenz-Reiter ausschalten, dafür unter dem Regex-Reiter eine neue Regel erstellen, die diesen Check ersetzt aber Rücksicht auf Ausnahmen nimmt. Für Französisch zum Beispiel kann man die folgende Regel als Forbidden regex match in target((Leider sind die Hilfsseiten von Kilgray auf Deutsch nicht aktuell, daher hier die englischen Namen.)) eingeben:

(?i)(?![nv]ous\b)(\b\S+\b)\s+\b\1\b

Wenn aktiviert, prüft diese Regel weiterhin nach doppelten Wörtern in der Zielsprache, einschließlich üblicher Interpunktionszeichen wie bspw. Apostrophen, ignoriert jedoch jeder Fall von „nous nous“ oder „vous vous“. Die Ausnahmen in der Regel vorne kann man dann beliebig erweitern, je nach Bedarf. Die Regel ist bestimmt nicht fehlerlos, aber sie kann die Anzahl der falschen Warnungen enorm verringern, ohne dass man auf diesen Check komplett verzichten muss.

[Foto von Ilya Pavlov auf Unsplash]

memoQ QA Check Tweak

Dieser Eintrag ist auch auf Deutsch verfügbar.

memoQ has a handy little feature as part of its QA check which warns you whenever you double up a word in the target language. I’ve had it catch numerous little and ands and to tos which slip into my work on occasion. However certain combinations of doubled up words are fairly commonplace, which can lead to this feature producing lots of unnecessary false errors. A classic example in English might be two hads in a sentence like ‘I had had enough,’ but that pales in comparison to a language like French, which sees plenty of doubled up words in pronominal verbs (nous nous lavons, vous vous souvenez etc.)

One way to fix this is to make use of the relatively new regex feature built into the QA check. Untick the option to check for duplicate words in the target under the Consistency tab. Then under the Regex tab we can replicate this functionality, while including our own exception to the rule. Add a new rule of the type Forbidden regex match in target, give it a relevant description, and then add this target regex:

(?i)(?![nv]ous\b)(\b\S+\b)\s+\b\1\b

When active, this rule will continue to highlight any duplicate words in the translation, including all the usual punctuation marks, but ignores any occurrences of nous nous or vous vous. Obviously these exceptions at the front can be replaced with whatever is required in the target language. The rule isn’t by any means flawless, and will for example also complain about repeated sequences of numbers, but it can help to reduce the number of false positives without having to abandon the check altogether.

[Photo by Ilya Pavlov on Unsplash]

Page 1 of 2

Powered by WordPress & Theme by Anders Norén