If you want to randomly change the wallpaper on mac osx you can use the built-in functionality. However, if you want to pick an image from a subdirectory you need to use this little script.
Continuing from maze solver update, I came across another very large maze at Purpy Pupple wikipedia page. And when I say large, I mean 4000x4000 large. Purpy calls it 2000x2000 but since it is very clearly 4000 pixels by 4000 pixels I'm calling it as 4k.
The Sandy Bridge reviews sure paint a nice picture for this new cpu. I'm currently leaning towards the i5-2400 or the i7-2600 if I'm feeling rich. The K series are unacceptable since they don't support VT-d.
However, unless the platform can do the following I won't be buying it.
I want to use a discreet video card and the on-chip video card simultaneously. I want to run my htpc in a virtual machine and “give” either of the cards to it via pci passthrough. By having the htpc own the card it should have great performance and if I break X on either the host or the htpc guest I just have to flip the input on my receiver and continue on my way.
Since I currently use kvm and not xen, kvm will need to be upgraded to support display pci passthrough. The guest will need to be full screen of course, Spice may be required.
So hopefully Fedora 15 will be able to handle all that.
Here's a follow up to my previous post, maze solver. I've finally gotten around to solving this properly with a breadth-first search. Shortest path is 16031, 11% better than my previous best.
If you'd like to be able to easily see which one of your kvm guests is the cpu hog, make links from to qemu-kvm
cd /usr/local/bin
ln -s /usr/bin/qemu-kvm vm_magneto
virsh edit magneto
# change emulator to
<emulator>/usr/local/bin/vm_magneto</emulator>
virsh reload
virsh shutdown magneto
virsh start magneto
A static variable in a class method are shared between all instances of that class and not per class instance.
#include <stdio.h>
class Foo {
public:
int foo() {
static int i = 0;
i++;
return i;
}
};
int main() {
Foo a, b;
printf( "a: %d\n", a.foo() );
printf( "b: %d\n", b.foo() );
}
a: 1
b: 2
EventSync from fbevents.net is a great app to sync OSX iCal with Facebook. However, if you ever do something to your calendar and EventSync is no longer updating your calendar then do the following from a terminal.
rm -r "~/Library/Application Support/SyncServices/Local/clientdata/com.llsoftware.fbevents"
I still don't know what eigenvalues are, what they're for, or how to use them, but I needed to calculate them for work and make sure they were positive.