25 February 2005

Keep FreeBSD package up-to-date

I believe that I learn the hard way to update my packages in FreeBSD. If I found this article earlier, I don't need spend much time googling and ask people why it so damn long to update my portsdb using 'portsdb -Uu' refer this, how to get packages in STABLE branch instead of RELEASE, is it any alternative to cvsup, ...


How to concatenate 'string' in C?
First, using python
>>> str1 = "helmi #"
>>> num = 1
>>> str2 = "%s%d" % (str1, num)
>>> print str2
helmi #1
>>> str3 = str1 + str(num)
helmi #1

Using C,
char string[] = "something";
char string2[50];
int number = 14;
sprintf(string2, "%s%d", string, number);

After spend some times googling then I found the solution in a post at comp.lang.c.

24 February 2005

Black-out again!

black-out again at my office around 4pm. This is second time for this week. black-out = delayed task since my job depends almost on computer.

Deal with xml, ElementTree is cool and pythonic :-) The htmlgen.py by a guy quite cool, just like phphtmllib paradigm to create the html tag.

Someone ask me to plot graph using Visual Basic. Then I suggest to her use the Microsoft Excel since the data is from experiment. If data from formula or involve calculation I would suggest matplotlib or scipy.

23 February 2005

Malaysian Vim group

My friend create a group for vim fan, from Malaysia. Malaysian are welcome to join myvim. The learning curve to learn use this editor is steep. But once, you able to edit the text using Vim, you can't live without it :).

Don't spend much time to find tips/shortcuts for vim (even worse learn all the editor commands). This article explain why, Seven habits of effective text editing.

C programming links:
C Programming Tutorial. Brief tutorial.

XOSD - X On-Screen Display:
Guide and reference.

22 February 2005

Some of my FreeBSD configuration files.

torsmo - Tyopoyta ORvelo System MOnitor
.torsmorc (see also /usr/X11R6/share/examples/torsmo/torsmorc.sample)


.Xdefaults
.vimrc