Log in



Archive for November, 2006

Using Word spellchecker in your application

November 22nd, 2006 by Peter

We are currently thinking about the integration of Word spell checking in our favourite LaTex editor TeXnicCenter. If you look for some example code (which really is hard to find), use these two articles as starting point:

Using Word’s spellchecker in C#
Creating a Custom Spell-Checker with Word 2003 and Visual Basic .NET

Migration to WordPress

November 17th, 2006 by Peter

Oh yeah ! Finally I managed it to migrate to a real, useable, and maintained blog system. WordPress rocks, and a nice guy saved all my old postings by providing a converter from BBlog to WordPress. I now will reformat all earlier stuff step-by-step …

Monitoring of OpenVZ

November 16th, 2006 by Peter

I am currently playing around with OpenVZ in a production environment. So far it runs pretty stable. One of the biggest issues so far was that the vzcalc tool computes way to small limits for some of the system parameters, like the maximum number of inodes allowed. The monitoring tools either trash you with unimportant information (/proc/user_beancounters), or say nothing important (vzctl status). I created the following python snippet, in order have a one-stop view on the status of my virtual machines. Check the documentation of vzlist, in order to extend the overview with your favorite set of information. Two print statements use escape codes to set the output color to red, and back. Maybe somebody can explain me a better way for this in Python …

[source:python]
import sys
import os
maxslen=12
printparams = [['vpsid', 'VPS ID'],['hostname', 'Hostname'],
['ip', 'IP address'],['status', 'Status'],
['laverage','Load average']]
diffparams = [['numproc', 'Processes'],['numfile', 'Open files'],
['numflock','File locks'],['physpages','4k Pages'],
['numtcpsock','TCP sockets']]
diff2params = [['diskspace','Disk'],['diskinodes','Inodes']]
def printdiff (name, param, maxsuffix):
value = os.popen(‘/usr/sbin/vzlist -H -o ‘ + param + ‘ ‘ + sys.argv[1]).read()
max = os.popen(‘/usr/sbin/vzlist -H -o ‘ + param + maxsuffix + sys.argv[1]).read()
percent = int(value)*100/int(max)
if percent > 90:
sys.stdout.write(‘^[[0;31;40m')
print '%s : %i %% (%s of %s)' % (name.ljust(maxslen) ,percent, value.strip() , max.strip())
for param, name in printparams:
value = os.popen('/usr/sbin/vzlist -H -o ' + param + ' ' + sys.argv[1]).read()
print name.ljust(maxslen) + ‘ : ‘ + value.strip()
for param, name in diffparams:
printdiff(name, param, ‘.l ‘)
for param, name in diff2params:
printdiff(name, param, ‘.s ‘)
print ‘^[[0;37;40m'
[/source]

MS roots

November 16th, 2006 by Peter

Not sure if this description really fits to reality, but it’s anyway nice to read. At least, I have the same mixed feelings about Vista:

http://davidbau.com/archives/2006/03/25/vista_and_the_altair.html

PhD page count

November 13th, 2006 by Peter

My former professor from Humboldt University told me his metric for a PhD thesis evaluation:

Number of great new ideas = 100 / page count

Writing 100 pages means having one new idea. Writing 200 pages usually indicates a half idea. The shortest PhD I am aware of has 18 pages ;-)

Mirroring a web site

November 5th, 2006 by Peter

You might also have the problem of mirroring a complete web site. Doing it the ‘friendly’ way, without trashing somebody elses server works like this:

wget -b -o wget.log -w 7 --random-wait -E -r -k -p

  • You are currently browsing the troeger.eu blog archives for November, 2006.