Tuesday, January 17, 2006

Latex: draft option

Writing some long document/article in latex with a lot of figures can be not very nice; providing that, the more figures you have the more time it takes to render your documents. Therefore, sometimes it is usefully to just switch off graphics. This can be done by using 'draft' option in a document class e.g.\documentclass[onecolumn,12pt,draft]{article}
Thanks to this embedded pictures are not displayed; instead, only an outline of the box taken up by the picture is shown. This significantly improve rendering.

Sunday, January 15, 2006

Matlab: getargs.m

Get arguments function code (getargs.m)
function S = getargs(defaultS, varglist);

if mod(length(varglist),2) ~=0
error('Odd number of variable parameters');

S = defaultS;
while i <= length(varglist)
if isfield(S, varglist{i})
S.(varglist{i}) = varglist{i+1};
warning_wrap('getargs:unknown_param', ...
['Unknown parameter "' varglist{i} '"']);
i = i+2;

Tuesday, January 10, 2006

Ubuntu: quick setup of vsftpd server

Instead of proftpd it is faster to use vsftpd. After installation (sudo apt-get install vsftpd) just: sudo vim /etc/vsftpd.conf
And uncomment lines:write_enable=YES
and comment line: #anonymous_enable=YES
Finally restart server by: sudo /etc/init.d/vsftpd restart