Intelligente Titelüberblendung mit iTunes

iTunes unterstützt seit jeher das Ãœberblenden von Titel (engl. “cross-fade”). Während ein solches Feature bei einer zufälligen Wiedergabeliste sicherlich sinnvoll ist, gibt es bestimmte CDs (meistens Live-Aufnahmen), bei denen eine solche Ãœberblendung nicht so toll ist.

"Titel überblenden" aktiviert in den iTunes Einstellung

Heute bin ich nun über einen Tipp gestoßen, dass die Titelüberblendung in iTunes tatsächlich ziemlich “intelligent” ist. Denn sie beachtet die Option Unterbrechungsfreies Album, die für jeden Titel angegeben werden kann.

Unterbrechungsfreies Album für einen Titel aktiviert
Zufällige Wiedergabe ist aktiviert

Ist Titel überblenden in den Optionen von iTunes aktiviert und wird nun ein Titel abgespielt, bei dem Unterbrechungsfreies Album auf Ja gesetzt ist, dann verzichtet iTunes bei diesem Titel auf die Titelüberblendung – es sei denn, die Option Zufällige Wiedergabe ist aktiviert. In diesem Fall werden auch Titel “übergeblendet”, die Teil eines unterbrechungsfreien Albums sind.

Zusammenfassung (bei aktivierter Titelüberblendung):

  • Titel wird übergeblendet:

    • Bei Titeln mit Unterbrechungsfreies Album auf Nein gesetzt
    • Wenn Zufällige Wiedergabe aktiviert ist
  • Titel wird nicht übergeblendet:

    • Bei Titeln mit Unterbrechungsfreies Album auf Ja gesetzt und wenn gleichzeitig Zufällige Wiedergabe nicht aktiv ist

(via Mac OS X Hints)

Sent Items in Outlook 2011 with Exchange and POP3

Today I needed to resend an email I sent a day before – using Outlook 2011 for Mac. It took a while to compose this email so I got quite scared when I looked at my “Sent Items” folder and the mail wasn’t there.

My situation: I’m using an Exchange mailbox is primary mailbox and have a POP3 account for my university email address. The latter I only use to send emails (as the actual university email address is just a forwarding). If you have a similar setup and problem, read on.

On Outlook for Windows, sending an email through this email address/account, moves the sent email to the main “Sent Items” folder – which at the same time is the “Sent Items” folder for my Exchange mailbox.

Not so on Outlook for Mac. Here we have a separate “Sent Items” folder for POP3 accounts (called “On my computer”). I had this folder disabled since (I thought) I only use my Exchange mailbox. The option hide/show this folder is in the preferences under “General”. (I only have the German version of Outlook, so screenshots are in German only; sorry for that.)

Option to show or hide the "On my computer" folder(s).
Option to show or hide the "On my computer" folder(s).

Now the “On my computer” folder showed up in my “Sent Items” folder and there my mails were.

Sent items on my computer folder
Sent items on my computer folder

Now, the quest at hand was: How do I get my sent mails into my “Sent Items” Exchange folder. The solution: Create a rule for this.

So, I went to “Settings” –> “Rules” and created a new rule in the “Outgoing” rules section.

Creating a local rule
Creating a local rule

Here you create a rule with:

  • Condition: Account is YourPop3Account
  • Execute: Move message to “Sent Items (Exchange)”

Leave the rest as it is and hit “OK”. Now try to send an email from your POP3 account and, voilà, the email you just sent should appear in your Exchange’s “Sent Items” folder.

Creating an Application class in Mono for Android

Android provides an Application class.

Base class for those who need to maintain global application state.

Here’s how to create such a class in Mono for Android:

[Application]  // <-- Attribute required
class MyApp : Application {
  // Required constructor
  public MyApp(IntPtr javaReference, JniHandleOwnership transfer) 
    : base(javaReference, transfer) { }

  // Test method - not required
  public override void OnCreate() {
    base.OnCreate();
  }
}

Note: There can only be one such class in an Android application.

Meaningful C++ error message

During my time as a student at the University of Stuttgart we had to learn the programming language Ada. Back then I was swearing about the compiler error message because they were totally meaningless (at least to me).

I am currently working on a C++ project and I have to say that C++ isn’t an inch better than Ada. Consider the following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <Windows.h>
 
namespace Geometry {
  class Polyline { };
}
 
using Geometry::Polyline;
 
namespace OtherNS {
  Polyline* get() {
    return NULL;
  }
}

Trying to compile this code gives you the following error message (on Visual C++ 2010):

using_test.cpp(10): error C2143: syntax error : missing ';' before '*'
using_test.cpp(10): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
using_test.cpp(10): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

What? Syntax error? And then you start looking where you missed a ;.

The problem, however, is completely different. It’s because there is a function called Polyline() defined somewhere in Windows.h and now the compiler tries to use this function as return type instead of the class Polyline (but doesn’t say anything about that). <irony>This, of course, becomes totally clear just by reading this extremely meaningful error message.</irony> *sigh*

GCC isn’t better here (in case you were blindly blaming Microsoft for writing bad error messages):

error: ‘Polyline’ does not name a type

By the way, the problem can be solved by placing the using statement inside the OtherNS namespace.

C vs. C++

C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.

— Bjarne Stroustrup, developer of the C++ programming language