Powershell, SVN Log, and Encodings

To automate packaging changes for our system, we use Powershell in conjunction with the default SVN client to extract relevant commits and then export all files therein to a package directory. After upgrading from SVN 1.6.12 to 1.8.1, however, I have noticed a weird encoding compatibility problem with SVN output and Powershell: the umlauts in filenames that were read from the SVN log became garbled in the process and the subsequent SVN exports stumbled over “filename not found” errors.

Continue reading

Posted in powershell, svn | 2 Comments

How to import user group memberships from AD to an SQL Server database

I am currently setting up an Active Directory import for a non-.NET system at work with a very limited set of tools. Essentially, I only have what the standard LDAP query can fetch me and what little logic I can implement in Transact-SQL on our SQL Server. The big problem is that LDAP refuses to output N-to-M relations as anything other than “unique N + all related Ms concatenated into a single string” tuplets. Relational databases, on the other hand, refuse to split a single string field back into multiple records. This conflict of interests can only be solved by application-layer logic but the application I am working with cannot do that and I don’t want to involve any more middleware here.

Continue reading

Posted in active directory, sql, sql server | 2 Comments

An alternative to the Karma Meter

Many computer role-playing games, both classic and contemporary, feature a so-called “karma meter“–an abstract scale measuring how “good” or “evil” the player character is. Said scale is usually singular and one-dimensional, so the player can move either “up” (to sainthood) or “down” on it (to an abstract ideal of absolute evil) during gameplay. It may be capped on both sides (a la Ultima IV, which actually had eight competing virtue scales) or unlimited in either direction (a la Fallout). The present positioning on the scale affects dialogue and sometimes gives bonuses to “good” or “evil” abilities.

Continue reading

Posted in games, writing | 3 Comments

How to install JDK from PowerShell silently

A couple of days ago, I have fought long and hard battle against JDK (Java Developer Kit) installation packages. The goal was to deploy the JDK offline to a custom path on a Windows (XP + 7) system using a PowerShell script. The problem was that the jdk.exe installer (the only one available from Sun) has trouble parsing INSTALLDIR value if it contains whitespace (e.g. “C:\Program Files”). Also, PowerShell has trouble interpreting parameters containing with escaped quotes in the middle, like /v"something".

Continue reading

Posted in java, msi, powershell | 20 Comments

How to copy HTML tables to MS Excel

A quite simple question, really, but I’ve had some trouble with it today.

Continue reading

Posted in html, ms office | Comments Off on How to copy HTML tables to MS Excel

How to make Ace Combat 3 [JP] run on Windows 7 and XP

Ace Combat 3: Electrosphere was an amazing game. There are two problems with it, however. First, it’s real old. Like, PlayStation 1 old. Older than Jesus, as some would say. Second, the export version of it sucks. It’s not a personal opinion but the harsh truth. Therefore, in order to play the original Electrosphere, you will have to put a lot of effort into it first.

Continue reading

Posted in emulators, games | 1 Comment

What is a trope?

Recently, I have been excessively active on the TV Tropes wiki, and I have noticed that a lot of new “trope” suggestions are not tropes at all. I believe the reason for this is the lack of understanding of  the term “trope” in the TV Tropes’ sense of this word. In the following discourse, I will attempt to answer the question “What is a trope?” to the best of my understanding.

Continue reading

Posted in writing | 2 Comments

How to configure Macaw in the “noob mode”

I have recently purchased a MIDI keyboard (this particular model, to be exact) to learn playing piano without annoying the neighbours. As I did, however, I had only a vague idea of how to actually synthesize sounds with it. I thought, surely, there must be tons of software that would allow me to just plug-and-play my controller and enjoy. Reality proved me wrong.

Continue reading

Posted in midi | Comments Off on How to configure Macaw in the “noob mode”

How to wait for a remote process in PowerShell

A short one today. I’ve been scripting in PowerShell (v1) recently, and had enormous trouble working on remote PCs (the full remoting functionality has not been enabled in our environment yet, so things like Enter-PSSession don’t work). One thing that cost me more nerve cells than usual was the synchronization of remote processes, since PS doesn’t really offer any means for that by default. I was, however, able to find a workaround.

Continue reading

Posted in powershell | Comments Off on How to wait for a remote process in PowerShell

How to configure a SoundFont in Windows 7

As you may already know, the MIDI sound file format does not contain any sounds per se. Instead, it is something like a score sheet that tells your operating system which sounds to play at certain times and for how long. Said sounds are stored on your own hard drive or synthesized in real time by the OS itself.

Long story short, the default sound synthesizers on Windows 7 (and probably earlier versions) suck. The only instrument that sound more or less natural is a piano, whereas the guitars, much less distorted or overdriven ones, sound awful. Those who don’t have to work with MIDIs often may be fine with just that, but if you would like to compose music on your PC, you definitely need a decent SoundFont.

Continue reading

Posted in midi | 39 Comments