Follow me
-
Recent Posts
calendar
Recent Comments
- Peter D. on How to use subprocess with PIPEs
- Ali Zhang on About matplotlib colormap and how to get RGB values of the map
- cloud on gimp: how to make a transparent background
- Stan Blum on gimp: how to make a transparent background
- 1125 on pytest-cov collects no data on Travis
Archives
Categories
Meta
Media RSS
Monthly Archives: October 2011
Python: how to share a local directory on the web
A simple way to share a local directory on internet (temporarily) can be performed with Python. First, go to the directory you want to share and then type: [admin@localhost Work] python -m SimpleHTTPServer 7000 Serving HTTP on 0.0.0.0 port 7000 … Continue reading
Malloc and Casting
In C, the malloc function is used to allocate memory. Its prototype is: void *malloc(size_t size);void *malloc(size_t size); It returns a void pointer (void *), which indicates that it is a pointer to a region of unknown data type therefore … Continue reading
vim: replace tabs by spaces
In the vim editor, the default behaviour of the tab key is to print a tab … not surprising. When coding, you may prefer tab to be replaced by spaces (because this is your coding style for instance). This feature … Continue reading
Allocation 2D arrays in C (and freeing memory)
By convention, when dealing with 2D array, the first dimension refer to the rows, and the second to the columns. To create a 2D array (double pointer) in C, you first create a 1D array of pointers (rows), and then, … Continue reading