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.
I took a vacation over Christmas to Costa Rica with Gap Adventures (code CRA) so here is my packing list, including some much needed info about Rara Avis.
Since it's been two years since my last raid cost analysis, I figured it was about time to do another one.
Goals:
- increase my storage. Currently 1000GB using raid5 (3 x 500GB drives)
- preferably only use 2 drives as it costs money to spin an extra drive
- not spend too much
I saw a recent post of the most incredible maze I've ever seen. Well I just had to solve it.
I thought I had posted this ages ago, but in case anybody needs to know how, here's how you setup a virtual kvm firewall. I'm using Smoothwall but any distro would work.
Open files with jEdit from the terminal is a pain. Here's a script to help.