Archive for the 'MISC' Category

Non-recursively generating permutations

Saturday, October 15th, 2005

A cool link:

In essence the algorithm works as follows:

1. start looking from the end of the sequence for two consecutive values i and ii such that i < ii.
2. start looking from the end of the sequence for the value j greater that i (the worst case getting ii or earlier).
3. swap i and j
4. reverse the sequence ii to last.

Examples:

123 -> i = 2, ii = 3, j = 3 -> 132
132 -> i=1,ii=2,j=3 -> 213
213 -> i=2;ii=3;j=3 -> 231
231 -> i=1;ii=2;j=2 -> 312
312 -> i=2;ii=3;j=3 -> 321
321 – END

It also generates only unique permutations if there are some duplicates in the sequence (e.g. AAABBB) Cool!

Stages of project management

Sunday, September 18th, 2005

1. Enthusiasm
2. Disappointment
3. Fear
4. Panic
5. Looking for cuplrits
6. Punishing of cuplrits
7. Awards for those not involved in the project

IP_DUMMYNET

Thursday, September 8th, 2005

IP_DUMMYNET
DUMMY_NET does not seem to work on Linux, but maybe NISTnet serves a similar purpose?

Mental hot-line

Monday, August 22nd, 2005

This is mental hot-line, if you are obsessive compulsive, press 1 repeatedly. If you are co-dependent ask someone to press 2 for you. If you have multiple personalities press 3,4, 5 and 6. If you are paranoid, we know who you are, we will call you………

“Hello, Welcome to the Psychiatric Hotline.”
If you are obsessive-compulsive, please press 1 repeatedly.
If you are co-dependent, please ask someone to press 2.
If you have multiple personalities, please press 3, 4, 5 and 6.
If you are paranoid-delusional, we know who you are and what you
want. Just stay on the line until we can trace the call.
If you are schizophrenic, listen carefully and a little
voice will tell you which number to press.
If you are manic-depressive, it doesn’t matter which
number you press. No one will answer

Xdoclet problem

Tuesday, November 16th, 2004

Xdoclet, Jasper2 combined together in an ANT file – classloader problem – classloaredref – set to the same value