What to do when 'dpkg --configure -a' does not work?

Submitted by Druss on Tue, 2013-12-03 11:37

I recently had trouble with a MySQL installation in Ubuntu. For some reason or the other, during an upgrade to a newer version of mysql-server, the upgrade script had issues stopping the server and the script failed. This meant that apt could no longer function as it kept raising a red flag over the broken upgrade with the following instructions:

Updating Windows Installer on XP 64-bit

Submitted by Druss on Sat, 2013-10-12 04:08

I ran into a hitch while trying to install the latest version of TortoiseSVN on my XP 64-bit Windows installation. Apparently, the entire world has forgotten about the existence of this variety of Windows. There's absolutely no mention of it anywhere on TortoiseSVN's installer page. The MSI installer failed stating that the version of Windows Installer that I was using was dated and that I needed to update my version of XP (x86) to SP3 or some other drivel like that. TortoiseSVN has no manual install option either. I did the whole Windows Update thing as well, to no avail.

Starting krfb in minimised mode

Submitted by Druss on Mon, 2013-08-05 16:16

I've got Kubuntu running my HTPC and XBMC starting up in full screen on boot. Besides XBMC's remotes which I operate from an Android tablet, I also use a VNC client on said tablet to connect to the HTPC to operate other programs. As a VNC server, I've got krfb also starting up on boot which is where my problem lies. krfb does not start minimised in the system tray. There is also no option to get it to do so in its configuration screen.

Here is a guide on how I have krfb configured to start it minimised.

CAPS LOCK issues when VNCing into Kubuntu and krfb

Submitted by Druss on Mon, 2013-08-05 15:30

I'm trying to VNC into my Kubuntu box using Jump Desktop from my Android tablet. All works well and everything is quite peachy. Everything that is, except for typing with the keyboard. Typing anything results in letters being displayed in capitals. Using the SHIFT key in the Android keyboard does fuck all. However, when I connected a keyboard to the Kubuntu box and pressed the CAPS LOCK key, my Android keyboard started typing in smalls.

MySQL encoding error: Warning (Code 1366): Incorrect string value: '\xE9, a <...' for column 'body' at row 3

Submitted by Druss on Sun, 2013-06-02 13:10

While performing a CSV import recently, I ran into the following error messages:

Warning (Code 1366): Incorrect string value: '\xE9, a <...' for column 'body' at row 3
Warning (Code 1366): Incorrect string value: '\xE6. He ...' for column 'body' at row 24
Warning (Code 1366): Incorrect string value: '\xE9, and...' for column 'body' at row 26

The first message was triggered due to the accented é in the word, protegé, in the input. The rest of the field was not imported. The others were similarly triggered.

Changing a file's encoding using Vim

Submitted by Druss on Sun, 2013-06-02 13:07

During imports and stuff, it's imperative that all steps utilise the same encoding/character set. If a text file is not using the preferred encoding, we can use Vim to change it during its save action as follows:

:set fileencoding=utf8
:w

or if you want to save it to a different file and leave the current file unchanged:

:w ++enc=utf-8 newfile.txt

Vim does not respect certain regex character classes during substitutions

Submitted by Druss on Sat, 2013-06-01 07:48

Just now while attempting to perform a substitution in GVim, I found that the regex was not working as expected. Apparently, instead of matching all non-whitespace characters denoted by the shorthand class \S, the engine was matching the letter S instead, which was odd. It turns out that, as usual, I was the one at fault. What I was doing wrong was attempting to use the character class within [] groups.

Vim runs out of memory during a find and replace

Submitted by Druss on Sun, 2013-05-26 07:59

Earlier today, I had to perform a substitution in Gvim within a 2GB file. Unfortunately, after a few thousand operations, Vim ran out of memory with the following error:

  Out of memory!
Out of memory!  (allocating XXX bytes)

Windows too complained about running out of virtual memory and my system slowed down to treacle-like response times.

Pages

Subscribe to languor.us RSS