It is nice to know, at least there is some people out there love open source.
Channel: FreeNode
Room: #MyOSS
It is nice to know, at least there is some people out there love open source.
Channel: FreeNode
Room: #MyOSS
Just found one free domain name server run by one of malaysian open source supporter angch.
DNS IP: 202.190.85.116
It should be better than TM dns because not too many people use it or OpenDNS since it is located in malaysia.
String is where buffer overflow always occur.
GLIB supports doing this much more easily:
/* portable asprintf() */
char *str = g_strdup_printf("string%s%d", str_variable, int_variable);
Or if you wanted a modifyable buffer:
GString *str = g_string_new(NULL);
g_string_append(str, "string");
g_string_append(str, str_variable);
g_string_sprintfa(str, "%d", int_variable); /* no g_string_append_int() */
extern – Variables described by extern statements will not have any space allocated for them, as they should be properly defined elsewhere.
static – The static data type modifier is used to create permanent storage for variables. Static variables keep their value between function calls. When used in a class, all instantiations of that class share one copy of the variable.
const – The const keyword can be used to tell the compiler that a certain variable should not be modified once it has been initialized.
If you writing gtk application. You will have to use more than one source file to make the code more manage able. To compile the application you need to use make.
It is all you need to compile a c code with libgnomedb. This code will output an executable
file with name ekoken. A more complicated makefiles using variable is like this
CC = gcc
LD = gcc
CFLAGS =
RM = rm -f
LDFLAGS = `pkg-config --libs gtk+-2.0`
PROG =
OBJS =
all : $(PROG)
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
$(PROG) : $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) -o $(PROG)
clean :
$(RM) $(OBJS) $(PROG)
Where PROG is the executable output and OBJS is the object file output with .o suffix.
You can read more from this link
Makefile in C or C++
A simple makefile tutorial
Design pattern is somehow overlook in many newbie tutorial. But it is very important to know before even writing the code. I found a list of design pattern for PHP
I am a Debian user for almost four years now. I think one very unique feature on debian system is deboostrap.
Easily install debian distro using another running system to mounted drive.
i think it is better to start with
<?
php echo "hello world";
?>