Convert the movie by: ffmpeg -y -i input_file.avi -f avi -vcodec rawvideo -pix_fmt bgr24 -acodec pcm_s16le output_file.avi
Category: Software
Compile MATLAB functions in C and link them with Intel MKL CBLAS
The MATLAB utility “mex” (enter “help mex” in command window in MATLAB) is a wrapper for your actual compiler, like gcc. It does not support intels icc. But this is no reason not to use the Intel MKL libraries! Write your code and compile it with: mex cpuMatrixCBLAS.c -I/opt/intel/Compiler/11.1/069/mkl/include/ -L/opt/intel/Compiler/11.1/069/mkl/lib/em64t /opt/intel/Compiler/11.1/069/mkl/lib/em64t/libmkl_solver_lp64_sequential.a -Wl,–start-group /opt/intel/Compiler/11.1/069/mkl/lib/em64t/libmkl_intel_lp64.a /opt/intel/Compiler/11.1/069/mkl/lib/em64t/libmkl_sequential.a /opt/intel/Compiler/11.1/069/mkl/lib/em64t/libmkl_core.a… Continue reading Compile MATLAB functions in C and link them with Intel MKL CBLAS
start MATLAB in command line mode from bash/linux console
Sometimes I want to start matlab without having the (lame) X interface. Instead of, I just use the command line. For this purpose, just run: matlab -nodisplay Or even easier, by adding a small script in /$MATLAB_HOME/bin maybe named “matlabnoX” with the content above. Make sure to chmod the file such that it is runnable!
Sort collections in java
Usual problem: When you pass a java list to Collections.sort(List list), the elements are sorted according to their returned values retrieved by calling the objects compareTo() methods. Well, what to do if you suddenly want to sort the same list by another criteria? Then a comparator is your friend. A comparator knows how to compare… Continue reading Sort collections in java
Restart tomcat (the rude way)
To restart tomcat, fill the following two lines in a .sh file and make it executable (chmod +x [filename]): killall -s 9 java /[tomcat installation folder]/bin/startup.sh Warning: It kills all other java processes as well!
Use ETH SMS service for sending texts abroad
The following simple website demonstratates how to send texts using the free SMS service of the ETH (you need to be member of). The core task of the website is to send a HTTP post request to the following website: https://www.sms.ethz.ch/cgi-bin/sms/send.pl The documentation is found here: https://www.sms.ethz.ch/sms/simpledescription.htm The header data consists out of your ETH… Continue reading Use ETH SMS service for sending texts abroad
simple digital clock based on PIC 16F628
This is a small project i did several years ago. The board basically consist of 4 7-segment displays some resistors and 4 transistors and last but not least a PIC 16F628. This microcintroller from Microchip was my favourite one because they are robust and easy to use. They can be clocked using an internal clock… Continue reading simple digital clock based on PIC 16F628
mass delete unapproved wordpress comments by SQL
Open your favorite tool to execute sql-statements like phpMyAdmin and type: DELETE FROM wp_comments WHERE comment_approved = ‘0’
get sun java on debian based system
just type: sudo add-apt-repository “deb http://archive.ubuntu.com/ubuntu hardy main multiverse” sudo add-apt-repository “deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse” sudo add-apt-repository “deb http://archive.canonical.com/ lucid partner” sudo apt-get update sudo apt-get install sun-java6-jdk
xsl transform template for php5
// path to the xml document (may be url) $xml = “data.xml”; // path to the xsl document (may be url) $xsl = “transformation.xsl”; $xslDoc = new DOMDocument(); $xslDoc->load($xsl); $xmlDoc = new DOMDocument(); $xmlDoc->load($xml); $proc = new XSLTProcessor(); $proc->importStylesheet($xslDoc); echo $proc->transformToXML($xmlDoc);