Simple multithreaded Java Webserver

The following code (estimated 150 lines of code) implements a simple multithreaded Web Server in Java. The code is easy to read and contains no (really) complicated stuff. There are 5 classes: HTTPException.java This class extends Exception and overrides the getMessage(String) Methode, which is responsibe for example for the Error 404 Not Found message. MimeTypeResolver.java This… Continue reading Simple multithreaded Java Webserver

Concatenate multiple files

Sometimes data comes split into several files. It might be a table from a database exported to several csv files. You could use the cat tool in linux to combine the files: cat table_file1 table_file2 table_file3 > full_table

Published
Categorized as Linux

Concatenate multiple files

Sometimes data comes split into several files. It might be a table from a database exported to several csv files. You could use the cat tool in linux to combine the files: cat table_file1 table_file2 table_file3 > full_table

Published
Categorized as Linux

Concatenate multiple files

Sometimes data comes split into several files. It might be a table from a database exported to several csv files. You could use the cat tool in linux to combine the files: cat table_file1 table_file2 table_file3 > full_table

Published
Categorized as Linux

distribute shared library with your binary (set rpath)

When a Linux binary is started, the run-time linker uses three sources for finding the needed libraries. First it is possible to set the LD_LIBRARY_PATH environment variable, second the “rpath” (this is a path encoded into the binary while compile time) and last but not least the systems’ default directory like /usr/lib. Now consider the… Continue reading distribute shared library with your binary (set rpath)

Create MATLAB readable avi from bmp frames

Use the following command ffmpeg -vframes 200 -f image2 -i airport1%03d.bmp -f avi -vcodec rawvideo -pix_fmt bgr24 -acodec pcm_s16le airport.avi This will convert all the files airport1000.bmp to airport1200.bmp to an avi file. Using mencoder will allow you to chose the framerate: mencoder “mf://*.bmp” -mf fps=12 -o out.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800