vsftpd 的解救

26 July 2006 at 2:24 pm (電腦)

[laocai@laocai.com laocai]# ftp localhost
Connected to localhost (127.0.0.1).
500 OOPS: could not bind listening socket
ftp> quit

Can’t connect to vsftpd!!! Stupid ya…

Solution:

  1. Edit /etc/vsftpd/vsftpd.conf
  2. Remove/Comment listen=YES, ie: #listen=YES
  3. Restart vsftpd: service vsftpd restart

Done!

p/s: vsftpd是unix/linux常用的ftp service

Permalink Leave a Comment

Bubble Sort

26 June 2006 at 3:21 pm (電腦)

sorting

我的媽呀! 兩層的Bubble Sort!!

……
        first_idx = last_idx = -1;

        for (j = first_idx; j <= last_idx; j++)
        {
            /* reset first idx and last idx */
            if (first_idx == -1)
                first_idx = rec;
            last_idx = rec;

            rec++;
        }  

        if (last_idx > first_idx)    
        {
            int x, y, temp;

            for( x=first_idx; x<=last_idx; x++)
            {
            for( y=x+1; y<=last_idx; y++)
            {
                if(array->rec[y].number < array->rec[x].number)
                {
                     temp = array->rec[y];
                     array->rec[y] = array->rec[x];
                     array->rec[x] = temp;
                }
            }
            }
        }
  ……

Permalink Leave a Comment

電腦世界

20 June 2006 at 3:22 pm (閑聊, 電腦)

comp world

在網上看到這一個可愛的漫畫
很有意思吧

Permalink Leave a Comment