marthijn. Rotating Header Image

How to fix the map change crash in Battlefield 3

Battlefield 3 owners could experience black (loading) screens during a map change when playing online. For me this only occurs when playing on Back to Karkand servers. I found this video explaining the solution: update PunkBuster manually.

Update Dec. 30 2011: Since my BF3 crashes at a map change again it seems the PunkBuster solution (as explained below as well) was only a temporary fix, and there’s no permanent one yet. An official bug report can be found here.

Continue reading →

How to send an e-mail from your Android app

I’m developing an Android application where the user must be able to send a file stored on the SD Card to a specific e-mail address. By using Android’s Intent class this is very easy. The following code snippet will bring up an e-mail application choose dialog.

String filename = "file://" + Environment.getExternalStorageDirectory() + "/file.txt";
String email[] = { "foo@bar.com" };
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "My file");
sendIntent.putExtra(Intent.EXTRA_EMAIL, email);
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(filename));
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, "EMail file"));

Fix .NET 4 SocketPermission for MySQL driver in Medium Trust

Most .NET 4 shared hosting providers offering their customers a medium trust environment. This is not a problem for most web applications unless the applications uses MySQL in combination with the .NET MySQL driver (MySQL.Data.dll). The MySQL driver connects to the MySQL database using a socket. However, sockets are not allowed in medium trust. The application will throw a SecurityException with the following message:

Request for the permission of type 'System.Net.SocketPermission,  System, Version=4.0.0.0, Culture=neutral,  PublicKeyToken=b77a5c561934e089' failed.

Continue reading →

Building a Home Theater PC part 2

Today I finally assembled my HTPC. There were some stock issues with the case I ordered, so after a week I ordered another. Although the motherboard is passively cooled I decided to enable one of the two case fans. Unfortunately the fans are very noisy when directly connected to the motherboard, so I placed a simple Zalman fancontroller between the fan and motherboard.

After building the HTPC I first installed Ubuntu 10.10 using a USB stick. Then I used this guide to install XBMC.

Continue reading →

Building a Home Theater PC part 1

Last year I build a home server based on the Intel Atom platform. In my second post I mentioned building an HTPC with the same components, but I wasn’t really sure the current Atom processors and Nvidia ION platform could handle video decoding with a full HD resolution. Since a few weeks I’m looking for information how to build an HTPC running XBMC based on the latest Atom processors with Nvidia ION 2. I found this blog and I think I will use more or less the same parts because it’s a very good price/value solution.

Continue reading →

Possible solution for NHibernate many-to-many criteria

In one of my .NET projects I’m using the NHibernate library for object-relational mapping. I’m mainly using the ICriteria interface to fetch data from the database. Unfortunately I ran into a function that got really complicated; how to query a many-to-many relationship. For example, I have a table containing posts and a table containing tags. The post datamodel contains a set with tags so in my mapping it’s a many-to-many relationship. I want my query to return all posts tagged with one or more specific tags. On this forum I found a solution. I’m not sure if this is the perfect solution, so feel free to suggest a better one.
Continue reading →

Using log4net to show NHibernate SQL in Visual Studio

I’m currently developing a web application in ASP.NET MVC and NHibernate. Since the application was very slow at some points I wanted to know which SQL queries NHibernate was executing. Since the log4net library was already included in the application I searched for a solution to output the SQL queries to the console in Visual Studio 2010 using log4net. I found the solution on this wiki and this blog post.

Continue reading →

How to lookup MIDI notes of your MIDI controller

Last week I helped Bas verifying his MIDI layout of the Reloop Digital Jockey 2 interface and controller edition. I used a program for Windows called MIDI-OX, a diagnostic tool for the MIDI protocol, to do this. In order to lookup the MIDI information sent by your MIDI controller turn on your device, start MIDI-OX and go to Options → MIDI Devices.

Continue reading →

Map Traktor’s Beat Phase Monitor to your Reloop Digital Jockey 2

In this video on YouTube you can see the LED of the Load A and Load B button blink on the Beat Phase Monitor of Traktor. In this post I’ll describe how to add this functionality to your Reloop Digital Jockey 2 mapping in Traktor.

Continue reading →

How to stop Traktor from editing ID3 tags

A few days ago I was trying a demo version of Traktor Pro. When playing some tracks I discovered the ID3 tags were missing when viewing the files in Windows Explorer. According to this topic Traktor changes the ID3 tags from version 2.3 to version 2.4 which can’t be read by Windows 7, so it’s not really a bug but rather annoying. In this post I’ll describe how to run Traktor as a different user in Windows 7 so it has no permissions to modify files any more. This solution is mentioned in this topic.

Continue reading →