Automatically Run and Minimize iTunes

So, more people now are having servers at home, which they’re using to run iTunes and stream to various speakers plugged into Airport Express routers. Myself included. Read more

Mnemonics: Cross Product

There are two ways to multiply vectors.  One of these is the “cross product”.  The cross product always yields a third vector perpendicular to both of the two vectors, whose magnitude is equal to the area of the parallelogram defined by the two vectors. The cross product is defined as:

A x B = [ a3b2 + a2b3 , a1b3 + a3b1 , a2b1 + a1b2 ]

Where A and B are vectors in 3-space.

There are three difficult to remember things about the cross product:

The direction of the resulting vector.

How to calculate the numerical value of the cross product from the two vectors’ components.

And what it means.

Mnemonic #1:

If in 3-space, positive k points forward (away from you), your first vector is your index finger, your second vector is your thumb, and your resulting vector is your middle finger.  In this case, remember that when admonishing demons, you hold the CROSS in your RIGHT hand as well as that you point your MIDDLE FINGER at other people, AWAY FROM YOU.

If in 3-space, positive k points backward (towards you), your first vector is your index finger, your second vector is your middle finger, and your resulting vector is your thumb.  In this case, also remember that when admonishing demons, you hold the CROSS in your RIGHT hand but that you do a THUMBs up TOWARDS YOU when you succeed.

Mnemonic #2

Above, you can see how to calculate the cross product.  To remember the pattern, know this:

The third child (the baby) always comes first, the first child (first born) always comes second, but the second child (middle child) always comes last.  So, you remember, 3 1 2.  Placing each of these in our vector, we get:

[ 3 , 1 , 2 ]

Next remember that what comes next in each is what is not there and not the position it is in.  So in the first one, there is a three and it is first, so what goes there is 2.  Doing this for all three positions yields:

[ 3 2 , 1 3 , 2 1 ]

Next, take what you have, reverse it, and append it so that you have three palindromes.

[ 3 2 2 3, 1 3 3 1 , 2 1 1 2 ]

Next place a’s and b’s alternating before the numbers.

[ a3 b2 a2 b3 , a1 b3 a3 b1 , a2 b1 a1 b2 ]

Now, place an additional symbol (+) in the middle of each section.

[ a3 b2 + a2 b3 , a1 b3 + a3 b1 , a2 b1 + a1 b2 ]

In the remaining spots for operations, place a multiplication symbol (*).

[ a3 * b2 + a2 * b3 , a1 * b3 + a3 * b1 , a2 * b1 + a1 * b2 ]

If, negative k points away from you, you need to place a minus symbol (-) at the beginning of each section.

[ -a3 * b2 + a2 * b3 , -a1 * b3 + a3 * b1 , -a2 * b1 + a1 * b2 ]

And that’s the cross product.  So, 5 simple patterns will yield the complex equation for the cross product.

Lilliput and Files: An Aventure in Endianess Issues

Background
In Jonathan Swift’s Gulliver’s Travels, the main character, Gulliver, arrives in a land of little people (called Lilliput). Here he encounters two warring factions — those that cut eggs from the little end first, and those who cut eggs from the big end first. Thus the Little-Endians and Big-Endians warred over something fairly unimportant.

Similarly, in the land of computing, there are two major factions of how to store datatypes in memory and on disk. They are also called Little-Endian (least significant first) and Big-Endian (most significant first). Please note that there are other factions. In school (and other places) we tend to learn to use binary and hexadecimal notation in Big-Endian format (where the right most digit is the ‘ones’ column).
Read more

Why don’t Focus() and SetForegroundWindow() work?

Once upon a time Microsoft decided these functions would no longer bring things to the foreground on Windows (about the time of Windows ME). Instead, these functions would make the taskbar button of the program or window flash incessantly.

This is all well and good, and I’m sure there were good intentions behind it, but quite frankly, it’s annoying when your app is supposed to come to the foreground and it doesn’t.
Read more

C++: How do I access Form1 from Form2 and vice-versa?

At first glance, this seems like an easy task. All you want to do is access a member variable or control from Form1 on Form2, and do the same from Form2 on Form1. Unfortunately, this is not the easiest thing to do, at least in (Managed) C++.
Read more

Old Flash Players

I’ve recently been assigned the task of rewriting Mapwing Flash Viewer (MFV) to be more optimized and add new features, etc. In the course of this task, it’s become necessary to be able to test the MFV in older versions of Macromedia’s Flash Player (FP).

On my development machine, I use Flash 8 Pro to develop our software. I also have a copy of MX 2004 Pro that I keep around in case I want to test something. The problem is that I didn’t want to have to install the entire development program on machines to just test the MFV in the two versions of FP (and the fact that doing so would be in violation of licenses).

Thankfully, Macromedia (or Adobe, now) provides a repository to download almost all old versions of the FP (including different revisions of major versions) on their website. You’ll find a link, just below.

New Link:
Archived Flash Players at Adobe.com.

Old Link:
Archived Flash Players at Macromedia.com.


Pertains to:
Flash Player 7 Download, Flash Player 6 Download, Flash Player 5 Download, Flash Player 4 Download, Flash Player 3 Download, Flash Player 2 Download, Old Flash Player Download, flash7installer.exe Download, flash6installer.exe Download, flashplayer7_winax.exe Download, install_flash_player.exe Download

Updated Aug 12, 2010 to point to new adobe.com page.

Unhandleable Exceptions

There is this wonderful error that sometimes happens when you’re running your .NET app on machines that are not your development machine:

Quote:

Application has generated an exception that could not be handled.

Read more