Notes by voodoo
Displaying notes 11 - 20
Created by voodoo on September 02, 2011 18:12:56
Last update: September 02, 2011 18:12:56
This is how to add the 3GB switch for Windows XP:
Remove system and hidden attributes of C:\boot.ini :
C:\>attrib -s -h boot.ini
Add the 3GB switch to C:\boot.ini :
[boot loader]
timeout=30
default=multi(0)dis...
Add system and hidden attributes:
C:\>attrib +s +h boot.ini
Reboot
Created by voodoo on August 30, 2011 12:30:59
Last update: August 30, 2011 12:32:33
Summarized from The C Book : There are essentially two types of object in C: the internal and external objects. Anything declared outside a function is external; anything inside one, including its formal parameters, is internal. Since no function can be defined inside another, functions are always external. All function declarations implicitly have the extern keyword stuck in front of them, whether or not you put it there. These two declaearions are equivalent:
void some_function(void); extern void some_func... The term linkage is used to describe the accessibility of objects from one file to another. There are three types of linkage: external , internal , and no linkage . Type of linkage Type of object Accessibility external external Across files, througout the program internal external Within...
Created by voodoo on August 27, 2011 19:17:10
Last update: August 27, 2011 19:17:10
The CPAN module Net::Socket::NonBlock has a port forwarding utility which works for both Unix and Windows:
$ perl tcpudppf.pl
Usage: tcpudppf.pl <LocalAdd...
Created by voodoo on August 27, 2011 08:27:04
Last update: August 27, 2011 08:27:04
My version of hardy (8.04) actually had postfix instead of sendmail :
# /etc/init.d/postfix restart
* Stopping Postf...
Created by voodoo on August 27, 2011 08:13:34
Last update: August 27, 2011 08:13:54
Symptoms:
used to work
hasn't been running since a certain day, verified by looking at the log timestamp
Solution: restart cron with
# /etc/init.d/cron restart
Created by voodoo on August 20, 2011 14:02:12
Last update: August 20, 2011 14:02:12
To find the current version:
$ sudo apt-cache search libdb
To install:
$ sudo apt-get install libdb4.6-dev
Reading pac...
Created by voodoo on August 14, 2011 15:42:43
Last update: August 14, 2011 15:42:43
When I ran this code snippet with strace :
f = fopen("TZ", "rb");
fseek(f, 0, SEEK_END);
...
I saw ENOTTY error with uClibc :
open("TZ", O_RDONLY|O_LARGEFILE) = 3
ioc...
With the normal gnu libc , there's no such error:
open("TZ", O_RDONLY) = 3
fstat64...
There was no error running the program. But for some reason, uClibc did a ioctl call when it opened a file, and handled it appropriately.
Created by voodoo on August 12, 2011 14:43:57
Last update: August 14, 2011 15:19:21
#include <stdio.h>
#include <stdlib.h>
i...
Created by voodoo on August 12, 2011 14:44:45
Last update: August 12, 2011 14:44:45
#include <fstream>
#include <iostream>
i...
Created by voodoo on August 12, 2011 13:32:13
Last update: August 12, 2011 13:32:13
To get rid of this compilation warning, add:
#include <stdlib.h>