I really wish it weren't so, because good people there are hurting badly, but all of a sudden, thanks to the global credit crunch, Iceland has become a cheap destination. Icelandair will fly you to Reykjavik from Boston or New York and put you up in the Hilton for three nights. Total cost: $559+ $90 [...]
Archives for the Month of October, 2008
Infrequently asked questions
Wednesday, 15 October 2008
Some of the things I do with Stata are so rare that I always forget how I'd done them before. So, they turn into questions and they're infrequent.
1. Turn a string variable into more variables, one for each word of the longest string:
split mystringvar, gen(stub)
2. Collect the levels of a categorical string variable into [...]
Cygwin, the kind-of-UNIX
Wednesday, 8 October 2008
A couple of days ago I installed Cygwin because I wanted a way to run UNIX applications in Windows. Cygwin sets up a UNIX-like directory with the root, /, wherever it is that you install it (by default, C:\cygwin).
Example of usage: to get SSH access to my server, I normally use PuTTY. But after I installed [...]
OpenSSH, take two
Wednesday, 8 October 2008
Today I had to re-generate my key files for OpenSSH authentication. Between August and now I had forgotten how exactly that is done. So for next time this happens, here are detailed step-by-step instructions:
1) plug FAT32-formatted USB stick into PC-BSD laptop; it will be automatically mounted as /media/fattie
2) from terminal window, do this:
% ssh-keygen -t [...]
Debugging C++ code (UNIX)
Friday, 3 October 2008
This assumes you're inside a UNIX terminal window (e.g., PuTTY session to remote UNIX box).
Compile a .cpp source file in the GNU debugger:
g++ -g -Wall -o mysourcefile.out mysourcefile.cpp
Before starting gdb, make sure you're in the same directory as the executable just compiled above. Then call gdb:
add GNU
Then start the gdb debugger:
gdb mysourcefile.out
Things you can do [...]
Getting data into Stata: odbc load
Wednesday, 1 October 2008
ODBC stands for Open Database Connectivity; odbc load is a tool for getting data out of ODBC-ready applications and into Stata quickly and reliably. One such application is Microsoft Excel. If you haven't yet received data in an Excel workbook, you will.
Just to get it out of the way: if you run Stata 10 and [...]