vsftpd 的解救
[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:
- Edit /etc/vsftpd/vsftpd.conf
- Remove/Comment listen=YES, ie: #listen=YES
- Restart vsftpd: service vsftpd restart
Done!
p/s: vsftpd是unix/linux常用的ftp service
Bubble Sort

我的媽呀! 兩層的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;
}
}
}
}
……






