A group of Americans, retired teachers, recently went to France on a tour. Robert Whiting, an elderly gentleman of 83, arrived in Paris by plane.
At French Customs, he took a few minutes to locate his passport in his carry on: "You have been to France before, Monsieur?", the customs officer asked sarcastically. Mr. Whiting admitted that he had been to France previously. "Then you should know enough to have your passport ready."
The American said, "The last time I was here, I didn't have to show it."
"Impossible. Americans always have to show your passports on arrival in France!"
The American senior gave the Frenchman a long hard look. Then he quietly explained: "Well, when I came ashore at Omaha Beach on D-Day in 1944 to help liberate this country, I couldn't find any damned Frenchmen to show it to!"
A small, comfortable nook pertaining to technology, current events, astronomy, and sailing and navigation.
Friday, February 22, 2008
Monday, February 18, 2008
Notable Quote, February 18, 2008
When in England at a fairly large conference, Colin Powell was asked
by the Archbishop of Canterbury if our plans for Iraq were just an
example of "empire building" by George Bush.
He answered by saying, "Over the years, the United States has sent
many of its fine young men and women into great peril to fight for
freedom beyond our borders. The only amount of land we have ever
asked for in return is enough to bury those that did not return."
It became very quiet in the room.
by the Archbishop of Canterbury if our plans for Iraq were just an
example of "empire building" by George Bush.
He answered by saying, "Over the years, the United States has sent
many of its fine young men and women into great peril to fight for
freedom beyond our borders. The only amount of land we have ever
asked for in return is enough to bury those that did not return."
It became very quiet in the room.
Friday, February 15, 2008
Wash Your Hands, Please!
I apologize in advance for a potentially pathetic digression, but I need to make a passionate plea: After using the restroom, PLEASE WASH YOUR HANDS! I'm no Adrian Monk, but gentlemen, do yourself (and all with whom you have contact) a favor and wash your hands after using the restroom in any capacity -- especially after the big deuce. Thank you!
Thursday, February 14, 2008
Bit Reversal By Bit-Banging
Here's an interesting C function to reverse the bits of an unsigned integer:
unsigned int reverse(unsigned int v)I really need my reverse(0x77ff0300) in the morning! Sorry, bad joke (and for the odd word-wrapping)...
{
v = (((v & 0xaaaaaaaa) >> 1) |
((v & 0x55555555) << 1));
v = (((v & 0xcccccccc) >> 2) |
((v & 0x33333333) << 2));
v = (((v & 0xf0f0f0f0) >> 4) |
((v & 0x0f0f0f0f) << 4));
v = (((v & 0xff00ff00) >> 8) |
((v & 0x00ff00ff) << 8));
return((v >> 16) | (v << 16));
}
Version Control With Subversion
Over the years, I've used more than a few methods of version or source control -- SCCS, RCS, CVS -- but I discovered that each had its weaknesses, and eventually stopped using them altogether. Then, about six months ago, I set aside my preconceived notions about learning yet another version control system (at the risk of wasting time), and began investigating Subversion. I cannot overemphasize how glad I am that I did. In addition to being significantly easier to use than CVS, Subversion provides atomic commits. This means that either the commit succeeds in its entirety, or it doesn't commit at all (i.e. all commits in the current context are rolled-back). This is a vital piece that insures the integrity of your data (e.g. if you experience a network or disk failure during the commit). Subversion also supports WebDAV access to the repository. This means that, in addition to direct access via the file:// method, and svn:// or svn+ssh:// protocol, a properly-configured Apache web server will allow access to the repository via http:// or https:// protocols.
If you're on the fence about whether or not Subversion can help you, or if you are seeking an experienced opinion about using it, leave a comment and I'll get back to you as soon as I can.
If you're on the fence about whether or not Subversion can help you, or if you are seeking an experienced opinion about using it, leave a comment and I'll get back to you as soon as I can.
Pretty-Print With Enscript
Here's how I obtain high-quality, syntax-colored prints (or PDFs) of my source code files:
#!/bin/bashEnscript knows about dozens of types of source for colorizing its output. Once I've created the Postscript output, I can either print it as it is, or generate a PDF file for a handy on-screen reference.
ENSCRIPT_OPTS="--fancy-header=emacs -H3 -j -f Courier7"
ENSCRIPT_OPTS="${ENSCRIPT_OPTS} --color -2 -r -E"
ENSCRIPT_OPTS="${ENSCRIPT_OPTS} --mark-wrapped-lines=arrow"
ENSCRIPT_OPTS="${ENSCRIPT_OPTS} --ul-position=+125-25"
if [ $# -lt 1 ]; then
echo "Usage: ..."
exit 1
fi
FILE=${1}
enscript ${ENSCRIPT_OPTS} ${FILE} -o ${FILE}.ps
Wednesday, February 13, 2008
Quick Powers Of Two Table
Here's a quick and dirty method of generating a table of powers of two at the command line:
#!/bin/bashNote that this does require BASH.
echo "Powers of two (2):"
echo;
for i in `seq 0 34`; do
printf "2**(%2d) = %11d\n" $i "$(( 2**$i ))"
done
echo;
Subscribe to:
Posts (Atom)