Crea sito

New Blog:

Moving in

How to get information about process memory usage

Each process running on a machine uses some memory, allocating memory on a heap or in the stack. In linux system there is a way to know how to get information about process memory usage, so that you can control how much memory a process is using and also check if there is any memory […]

g++ semaphore undefined reference

When you start working with thread or process you will probably need a way to coordinate them. One of this way is the use of semaphore, which allow you to coordinate several thread and regulate the access of shared memory. Using C++, the are several libraries that provide semaphores. One of these, that is Posix […]

GRUB, a missing partition

A little introduction: When in your system you have different operating system you need something that allows you to chose which operating system to use every time you boot your machine. This “thing” is called a boot loader.  The greatest loader for booting Linux and practically any other OS open source or otherwise is probably […]

How to convert .chm to .pdf files

Here it is a simple guide that shows how to convert .chm to .pdf files. First of all, a little introduction: CHM (Microsoft Compiled HTML Help) is a Microsoft proprietary online help format, that consists of a collection of HTML pages and an index and that is often used for software documentation PDF (Portable Document […]

How to count the files inside a directory and the subdirectories

Count the files Here there is the problem: given a directory, we need to get the number of the files (not directory) inside this directory (and the subdirectory). Plus, we need to count the numbers of the files for each subdirectory, in the same way. For example, if we have a directory like this: directory1: […]

How to know which version of Ubuntu you are running

There are a lot of versions of Ubuntu spread all over the years, but which one are you running? It’s easy, the information that you need is stored into /etc/issue. So, just type:            cat /etc/issue and you’ll see which version of Ubuntu you’re running. For example, in my case, that’s […]

How to redirect to an other URL with PHP

Using PHP, there is a very easy way to redirect the web page that you’re visiting to an other URL. To do that you need to use the method header, in this way: header(“Location: new URL”); Example: <?php /* Redirect browser */ header(“Location:”); exit; ?> The method header is used to send a raw HTTP header. […]

How to convert .nrg to .iso

How to convert .nrg to .iso : If you want to convert .nrg file to .iso file there is a simple tool that you can use: nrg2iso. This tool extract SO9660 data from Nero “.nrg” CD-ROM image files. Here there are the steps that you need to follow to install and use nrg2iso: Installation (with […]

How to nat a PC with an other PC

Here is the situation: you have 2 (or more) PCs with Linux system. One PC has at least 2 network interface and with one on them it is connected on Internet. The second PC instead has no access to the internet. If you want that also the second PC gets a connection, you can use […]