C - Unary operators - Using sizeof()

The sizeof() unary operator is often used, so it is important to know some tricks that we can do with it.

It is used to calculate the sizes of datatypes and it takes one argument: the type.

The main purpose of sizeof() is of course to allocate memory in conjuction with malloc.

C - Library functions - Using free()

The free() function is the sister of the malloc() function. As malloc() returns the address of the first byte of the allocated memory, free() accepts, as only parameter, the address of this first byte.

C - General Programming - Beep function

In this tutorial we will see a simple beep function. Let's take an example of the beep function:

UNIX & GNU/Linux - System calls - Using tgetflag()

The tgetflag() function is a Linux system call function. It is designed to be used with the getenv() and tgetent() functions.

UNIX & GNU/Linux - System calls - Using tgetnum()

The tgetnum() function is a Linux system call function. It is designed to be used with the getenv() and tgetent() functions.

UNIX & GNU/Linux - System calls - Using tgetent()

The tgetent() function is a Linux system call function. It is designed to be used with other termcap functions such as:

UNIX & GNU/Linux - System calls - Using getenv()

The getenv() function is a Linux system call function.

It is designed to know what is the name of an environment variable.

The main use is for the "TERM" variable. Let's see an example of the getenv() function:

Ruby on Rails 3 - Server - Start the (native) Webrick server

To start the native server of Ruby on Rails, WEBrick, you have to open a shell and go until the path of your website and write "rails server" to start it. Example on Windows:

$ C:/rubyOnRails/site1> rails server

Same for GNU/Linux:

MySQL - Commands - Pager

There is a way on GNU/Linux to change the display of the result of the SQL query. Just type:

$ pager less -i -n -S

Now make a command and look this new display!

UNIX & GNU/Linux - System calls - readdir()

The readdir() system call function is used to read into a directory.

Pages

Subscribe to BadproG.com RSS