Keeping SSH sessions alive with Mac OS X Terminal
Sunday, October 12th, 2008 -- By ETNeed to add the following lines to ssh config (~/.ssh/config or /etc/ssh/ssh_config depending on your desired scope)
ServerAliveInterval 300
ServerAliveCountMax 3
Need to add the following lines to ssh config (~/.ssh/config or /etc/ssh/ssh_config depending on your desired scope)
ServerAliveInterval 300
ServerAliveCountMax 3
It has been a headache to do decimal point alignment in latex.
Fortunately, there is a package called dcolumn that helps with this problem.
This dcolumn package “defines a system for defining columns of entries in an array or tabular which are to be aligned on a ‘decimal point’.”
Unfortunately, it is very hard to make the modifications manually on the tables to align the decimal points of numbers. I searched online and could not find a solution. So I created a web service that does this:
Basically, just visit the webpage: http://blog.mikezhang.com/dcolumn/.
There is only one field for you to browse a latex file. Make sure it has extension .tex, otherwise, the system would not accept the file.
Click Submit, you will obtain the converted file with correctly aligned numbers in your tables.
See the screen shot of the finished page:
Now clicking “FILE” will bring you the new file, in txt format. You need to change the extension to .tex to try it out. This intended trouble helps you to avoid overwriting your original file.
Here is how it worked on a paper:
Before:
and After:
It’s that simple:
use DBI;
my $conn = DBI->connect
("DBI:mysql:db","owner","ownerpass") or die("Cannot connect: $DBI::errstr");
$sql=qq(select field from table where id=$id);
@array=@{$conn->selectcol_arrayref($sql)};
There are more than two ways to do it. I just put down two quick ways.
Method 1:
In program:
processarray(\@array);
In sub processarray:
my $arrayref=shift;
my @array=@$arrayref;
Method 2:
In program:
processarray(@array);
In sub processarray:
my @array=@_;
The difference between a smart person and a wise person is that a wise person knows how not to get into situations that a smart person knows how to get out of.
Google blog posted an article on “Strengthening the Study of Computer Science”.
It started with:
At a time when more and more digital technologies are becoming indispensable to millions of people, the field of computer science (CS) is in trouble. Enrollment and retention of CS students, particularly those historically underrepresented in the field (women, African-Americans, Native-Americans, and Hispanics) has declined sharply.
I think the sharp decline in enrollment is really an issue, but the inner-economist of mine keeps saying that there is something wrong with the argument that we are able to address the issue by promoting this major to underrepresented people.

I believe in the invisible hand theory of resource allocation. There was definitely an excess in supply of CS students during the bubble years, but then the students shifted attention to other desciplines. We only have certain amount of brain power in the society, and the flow of these brains to different industries is definitely a good thing for the society as a whole. If computer science proves to be playing an ever increasing role in the society, I’m sure the brains will flow back. Just reward these brains accordingly.
Overall, the marginal decision maker should be indifferent to choose between any major if the market is effecient and can reward the students through the market system.

Copyright Xiaoquan (Michael) Zhang, 2004-2007. All rights reserved.
All trademarks property of their owners.