tag:blogger.com,1999:blog-68394502391552267222024-03-19T14:27:12.850+02:00bioeng-studentI try to collect hot stuff relevant to biomedical engineering hereBioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.comBlogger60125tag:blogger.com,1999:blog-6839450239155226722.post-30011939598146734032012-06-13T00:50:00.002+02:002012-06-13T00:51:12.204+02:00Installing ROS Fuerte on Fedora 17 (Failed!)<div dir="ltr" style="text-align: left;" trbidi="on">
I just installed a new Fedora 17 system to get familiar with it. Now I am trying to install the brand new ROS Fuerte on this Fedora system following the instructions <a href="http://mirror.umd.edu/roswiki/fuerte%282f%29Installation%282f%29Fedora.html">here</a>.<br />
<br />
Everything went fine until the make & install step<br />
<br />
<pre>make -j8
<span class="anchor" id="fuerte.2BAC8-Installation.2BAC8-rosinstall.line-2-2"></span>sudo make install</pre>
<pre> </pre>
<pre> </pre>
<pre></pre>
First, it is better to be cautious and just type <br />
<pre>make</pre>
without the <br />
<pre>-j8</pre>
part. Parallel compilation can get you into trouble some times! Second, with the <br />
<pre>sudo make install</pre>
step, I got an error complaining about the directory <span style="font-family: "Courier New",Courier,monospace;">~/ros-underlay/catkin/bin/em</span> is not found. Seems like this directory have to be present as if in a Debian system. So, <span style="font-family: "Courier New",Courier,monospace;">mkdir ~/ros-underlay/catkin/bin/em</span> solved this problem (apparently!).<br />
<br />
Following the instructions with the Desktop-Full install, I got another error at the step<br />
<pre>rosdep install -a</pre>
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">ERROR: Rosdep experienced an internal error.</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Please go to the rosdep page [1] and file a bug report with the message below.</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">[1] : http://www.ros.org/wiki/rosdep</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">Bad installer [yum]: global name 'pkgs' is not defined</span></span><br />
<br />
<br />
Actually, it seems like there is a ticket filed already for this bug <a href="https://code.ros.org/trac/ros/ticket/3962">here</a>. Following the bug assignee instructions, I downloaded the latest rosdep from github, and then extracted the archive ans installed it using<br />
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: x-small;">sudo python setup.py install</span></div>
<br />
The error disappeared. But now I have other errors!<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">Executing script below with cwd=/tmp<br />{{{<br />#!/bin/bash<br />export PREFIX=/usr/<br />if [ -f $PREFIX/include/assimp/assimp-version.installed ]; then<br /> [ 2ed0b9954bcb2572c0dade8f849b9260 = `cat $PREFIX/include/assimp/assimp-version.installed` ]<br />else<br /> false<br />fi<br /><br />}}}<br /><br />ERROR: the following packages/stacks could not have their rosdep keys resolved<br />to system dependencies:<br />rxtools: No definition of [swig-wx] for OS [fedora]<br />python_qt_binding: No definition of [python-qt-bindings] for OS [fedora]<br />image_proc: No definition of [opencv2] for OS [fedora]<br />image_view: No definition of [opencv2] for OS [fedora]<br />cv_bridge: No definition of [opencv2] for OS [fedora]<br />image_rotate: No definition of [opencv2] for OS [fedora]<br />opencv2: No definition of [opencv2] for OS [fedora]<br />image_geometry: No definition of [opencv2] for OS [fedora]<br />cv_markers: No definition of [opencv2] for OS [fedora]<br />stereo_image_proc: No definition of [opencv2] for OS [fedora]<br />opencv_tests: No definition of [opencv2] for OS [fedora]<br />depth_image_proc: No definition of [opencv2] for OS [fedora]<br />camera_calibration: No definition of [opencv2] for OS [fedora]<br />pcl_ros: No definition of [pcl] for OS [fedora]</span></span><br />
<br />
<br />
I tried installing the <span style="font-family: "Courier New",Courier,monospace;">assimp-devel</span> package. But this did not solve the problem. I also installed the <span style="font-family: "Courier New",Courier,monospace;">opencv-devel</span> and the <span style="font-family: "Courier New",Courier,monospace;">pcl-devel</span> packages.<br />
<br />
At this point, I decided to abandon it altogether, since I need to make a custom YAML config file! Since Fedora was a fresh install anyway, and since <a href="http://www.ros.org/wiki/fuerte/Installation/Ubuntu">ROS only supported Ubuntu officially</a>, I decided to give it a try on Ubuntu 12.04. <br />
<br />
<br />
<br />
<br /></div>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-36349820485754899732012-06-13T00:48:00.002+02:002012-06-13T00:51:22.160+02:00Fix to garbled display on booting Ubuntu 12.04 on Dell Vostro 470<div dir="ltr" style="text-align: left;" trbidi="on">
Trying to install Ubuntu 12.04 on Dell Vostro 470 gave me all kinds of trouble! At first, the graphical installer did NOT work, so I had to try the text-based installer (aka alternate installer). It was successful, but then I had to manually install the ubuntu-desktop package since I had no desktop installed! Not to mention that I was only able to log in to the system using the Recovery mode from GRUB menu. The default mode was giving me a garbled screen similar to <a href="http://www.youtube.com/watch?v=ebZZyJjRJGI">this one</a>, and I could never log into my system.<br />
<br />
To fix the garbled display problem, I did what was advised on <a href="http://thedaneshproject.com/posts/ubuntu-11-04-blank-screen-on-boot-solved/">this page</a>, by changing the kernel command line from 'quiet splash' to 'nomodeset':<br />
<br />
1)Edit: <span style="font-family: "Courier New",Courier,monospace;">/etc/default/grub</span><br />
Change:<br />
#GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"<br />
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset"<br />
<br />
2) Update GRUB by:<br />
<span style="font-family: "Courier New",Courier,monospace;">sudo update-grub</span><br />
<br />
Now I can log in to my system from the default entry on GRUB!</div>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-22376788455123377582012-03-10T10:47:00.002+02:002012-03-10T10:50:47.294+02:00Root Cause Analysis for library.nuIndeed, this is one of the best articles I have read in a very long time! The author takes a deep look at the shutdown of the library.nu website (formerly GigaPedia) and analyzes the real causes for the flourishing of such a 'pirate' society in our modern times. Long live Open Access to Knowledge!<br /><a href="http://www.aljazeera.com/indepth/opinion/2012/02/2012227143813304790.html">http://www.aljazeera.com/indepth/opinion/2012/02/2012227143813304790.html</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-45979052350582384612012-01-07T19:20:00.011+02:002013-01-07T17:10:01.534+02:00Compiling and Installing WFDB version 10.5 on Debian Squeeze<div dir="ltr" style="text-align: left;" trbidi="on">
<blockquote>
</blockquote>
<blockquote>
</blockquote>
<blockquote>
</blockquote>
Today I tried to compile and install the WFDB tools from the <a href="http://www.physionet.org/physiotools">PhysioToolkit</a> (<a href="http://www.physionet.org/">PhysioNet</a>) on my <a href="http://www.debian.org/">Debian</a> <a href="http://www.debian.org/releases/squeeze/">Squeeze</a> system. I am documenting this experience here!<br />
<div>
<br /></div>
<div>
<ol>
<li>Download the source package from <a href="http://www.physionet.org/physiotools/wfdb.tar.gz">http://www.physionet.org/physiotools/wfdb.tar.gz</a></li>
<li>Install the needed Debian packages first. I needed the following Debian packages</li>
<ul>
<li>libcurl4-gnutls-dev (for NETFILES feature support in WFDB, which allows you to work on portions of the PhysioBank data records online, without having to download the entire record on your computer)</li>
<li>libexpat1-dev (for XML parsing, some files did not compile successfully while installig the WFDB library because this package was missing)</li>
</ul>
<li>Follow the steps under "<i>if you download the sources (recommended):</i>" in the <a href="http://www.physionet.org/physiotools/wfdb-linux-quick-start.shtml">official quick start guide</a>. If you are on a 64-bit system (like me!) then do NOT install the WAVE application now</li>
<li>If you installed the WFDB library in a non-standard path (as I did), then probably you will need to adjust the $PATH and $LD_LIBRARY_PATH environment variables. I added the following snippet to my ~/.bashrc, (this will be automatically executed every time you login into a shell -- run '. ~/.bashrc' ('DOT SPACE ~/.bashrc') to execute the profile script immediately!) -- I also needed to manually copy the 'man' folder from the "(path to WFDB installation)/share/man" to '/usr/share/man' for manual enteries to be installed into the system! </li>
<div>
<blockquote>
</blockquote>
<div>
</div>
</div>
<blockquote>
<div>
<div>
</div>
<blockquote>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';"># add WFDB binaries to PATH</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';">PATH="</span><span class="Apple-style-span" style="font-family: 'courier new';">$PATH:</span><span class="Apple-style-span" style="font-family: 'courier new';"><i>(path to WFDB installation)</i>/bin"</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';"># add WFDB libraries to LD_LIBRARY_PATH</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';">LD_LIBRARY_PATH="</span><span class="Apple-style-span" style="font-family: 'courier new';">$</span><span class="Apple-style-span" style="font-family: 'courier new';">LD_LIBRARY_PATH:</span><span class="Apple-style-span" style="font-family: 'courier new';"><i>(path to WFDB installation)</i>/lib64"</span></div>
</blockquote>
<div>
</div>
</div>
<div>
</div>
</blockquote>
<li>Now you are ready to install the optional WAVE application in case you are running a 64-bit system. For this, I followed the instructions in <a href="http://wuzhaojun.wordpress.com/2010/09/18/install-physiotools-on-64-bit-ubuntu/">this post</a>. (Note: package ia32-libs must be installed!) Finally, you will need to further modify your ~/.bashrc to append the following</li>
</ol>
</div>
<div>
<blockquote>
</blockquote>
<div>
</div>
</div>
<blockquote>
<div>
<div>
</div>
<blockquote>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';"># add WFDB-32 binaries to PATH</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';">PATH="</span><span class="Apple-style-span" style="font-family: 'courier new';">$PATH:</span><span class="Apple-style-span" style="font-family: 'courier new';"><i>(path to WFDB-32 installation)</i>/bin"</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';"><br /></span></div>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';"># add WFDB-32 libraries to LD_LIBRARY_PATH</span></div>
<div>
<span class="Apple-style-span" style="font-family: 'courier new';">LD_LIBRARY_PATH="$</span><span class="Apple-style-span" style="font-family: 'courier new';">LD_LIBRARY_PATH:</span><span class="Apple-style-span" style="font-family: 'courier new';"><i>(path to WFDB-32 installation)</i>/lib"</span></div>
</blockquote>
</div>
</blockquote>
<b>Update1:</b> With WFDB version 10.5.13 on <b>Ubuntu</b> 12.04, I had to manually change two lines in each Makefile of the subdirectories (app,checkpkg,convert,examples,fortran,psd,xml) to compile with libcurl successfully<br />
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">LC = `curl-config --cflags`<br />LL = `curl-config --libs`</span></div>
<br />
Otherwise, I was getting errors such as<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">ann2rr.c: In function ‘help’:</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">ann2rr.c:370:6: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">/home/islam/wfdb/wfdb-10.5.13/build/lib64/libwfdb.so: undefined reference to `curl_global_cleanup'</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">/home/islam/wfdb/wfdb-10.5.13/build/lib64/libwfdb.so: undefined reference to `curl_easy_perform'</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">/home/islam/wfdb/wfdb-10.5.13/build/lib64/libwfdb.so: undefined reference to `curl_global_init'</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">/home/islam/wfdb/wfdb-10.5.13/build/lib64/libwfdb.so: undefined reference to `curl_easy_init'</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">/home/islam/wfdb/wfdb-10.5.13/build/lib64/libwfdb.so: undefined reference to `curl_version'</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">/home/islam/wfdb/wfdb-10.5.13/build/lib64/libwfdb.so: undefined reference to `curl_easy_setopt'</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">/home/islam/wfdb/wfdb-10.5.13/build/lib64/libwfdb.so: undefined reference to `curl_easy_cleanup'</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">collect2: ld returned 1 exit status</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">make[2]: *** [ann2rr] Error 1</span></span><br />
<br />
<b>Update2:</b> Check the solution posted by Murari Srinivasan and George Moody (the author of WFDB) in the comments below. The error above is temporary and should be resolved soon out-of-the-box.<br />
<br /></div>
BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com10tag:blogger.com,1999:blog-6839450239155226722.post-83553335457789339302011-10-04T22:26:00.003+02:002011-10-04T22:54:03.645+02:00Research by Dr. Moustafa YoussefToday I had the opportunity to attend a session given by <a href="http://www.cs.umd.edu/~moustafa/">Dr. Moustafa Youssef</a> on his research. The key point in his talk was about detecting the presence of humans inside a wireless network area by detecting variations in the wireless signal strength (Received Signal Strength Indicator, RSSI) at the receiver side. Dr. Moustafa introduced his <a href="http://dl.acm.org/citation.cfm?id=1067170.1067193">Horus system</a> based on this concept! Imagine the scenario in which your home wireless network acts as an intrusion detection system while you are sleeping at night. Dr. Moustafa and his group developed an all-software solution that provides this functionality by utilizing the hardware of the deployed wireless network and your laptop! If you are really interested, you can watch his Google Tech Talk <a href="http://www.youtube.com/watch?v=HOD0O0mJ_Iw">here</a>. The same concept is eventually being applied in hospital settings as well as discussed in <a href="http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=5670365">this paper</a>.BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-8752544736476194632011-10-03T13:41:00.009+02:002011-10-03T15:00:15.222+02:00The Adaptive Noise Canceller as a High-Pass Filter<div>In 1975 Widrow et. al. introduced a <a href="http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01451965">scientific paper</a> about Adaptive Noise Cancellers (ANCs). Since then, ANCs have been used extensively in different applications. This article is about the use of an ANC as a simple, yet powerful, high-pass filter.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwsQIsnbn0ngTmHxBjyDiAe78PWZClU_t5P3-VkygpSZp00Pe8X5Nsyhmco11-96bY641kXcn2nbilIPjKjXwUquOE9hjjo9vIbLeJFFJ-Hpa6Wwzix__AXogBSv3GyDsVpHLKWHs0ogHs/s1600/LMSHP.png"><img style="margin: 0px auto 10px; width: 400px; height: 250px; text-align: center; display: block; cursor: pointer;" id="BLOGGER_PHOTO_ID_5659243036723626866" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwsQIsnbn0ngTmHxBjyDiAe78PWZClU_t5P3-VkygpSZp00Pe8X5Nsyhmco11-96bY641kXcn2nbilIPjKjXwUquOE9hjjo9vIbLeJFFJ-Hpa6Wwzix__AXogBSv3GyDsVpHLKWHs0ogHs/s400/LMSHP.png" /></a><br /><br />As shown in the figure, a reference DC signal <strong>x(n)</strong>=1 is fed to a single-coefficient ANC. The noise estimate <strong>y(n)</strong> is the multiplication of the DC signal <strong>x(n)</strong> times the single coefficient, or weight, <strong>w(n)</strong>. The noise estimate is then subtracted from the input signal <strong>d(n)</strong> to obtain a noise-free sample <strong>e(n)</strong> which can be considered the output of the ANC. <strong>e(n)</strong> is also fed back into the Least Mean Squares (LMS) Algorithm block, which calculates a new value for the weight <strong>w(n+1)</strong> based on the correlation between the reference signal <strong>x(n)</strong> and the error signal <strong>e(n)</strong> using the equation<br /><blockquote>w(n+1) = w(n) + mu * e(n) * x(n)</blockquote> where <strong>mu</strong> is the adaptation step, usually a very small factor in the order of 0.01.<br /><br />Widrow et. al. proved in their 1975 paper that this structure is equivalent to a high-pass filter with a corner frequency determined by <strong>mu</strong>.<br /><br />The ANC is indeed a very simple, yet powerful, structure that has many applications in different disciplines. Recently, I've used the ANC as proposed by Widrow et. al. with some modifications for adaptive cancellation of power-line interference signals from the electrocardiogram (ECG), as shown in <a href="http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5716090">this paper</a>.</div>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-49061988159117387502011-06-12T14:02:00.006+02:002012-01-06T14:20:11.626+02:00Physiological Signals DatasetsIn this post I will be gathering some links about the physiological signals datasets that are publicly available on the web. This post will be updated from time to time!<br /><br /><strong><span style="font-size:180%;">Physiobank</span></strong><br />One of the largest platforms that makes it easy to contribute physiological signals is the <a href="http://physionet.incor.usp.br/physiobank/">PhysioBank</a> platform. Following are some of the interesting datasets available under PhysioBank. The easiest way to access these datasets is through the <a href="http://physionet.incor.usp.br/cgi-bin/ATM">PhysioBank ATM web interface</a>.<br /><br /><span style="font-size:130%;"><strong>ANSI/AAMI EC13 Test Waveforms</strong></span><br />The ANSI/AAMI EC13 standard for electrocardiographic monitors specifies <a href="http://physionet.incor.usp.br/physiobank/database/aami-ec13/">those test signals</a> for evaluating the performance of the electrocardiographic monitors.<br /><br /><br /><span style="font-size:130%;"><strong>Multi-Parameter Databases</strong></span><br /><a href="http://physionet.incor.usp.br/physiobank/database/#multi">Those databases</a> include different physiological signals typical of a patient monitoring device, such as ECG, Respiration, Continuous Blood Pressure, Plethysmogram, ... etc.<br /><br />An important subset of those databases are the <span style="font-weight: bold;">Polysmnographic</span> databases useful for sleep staging. Physionank contains the <a href="http://physionet.incor.usp.br/physiobank/database/slpdb/">MIT-BIH Polysomnographic Database</a>, the <a href="http://physionet.incor.usp.br/physiobank/database/sleep-edf/">Sleep-EDF Database</a>, the <a href="http://physionet.incor.usp.br/physiobank/database/shhpsgdb/">Sleep Heart Health Study Polysomnography Database</a>, and <a href="http://physionet.incor.usp.br/physiobank/database/ucddb/">St. Vincent's University Hospital / University College Dublin Sleep Apnea Database</a>.<br /><br /><br /><span style="font-size:130%;"><strong>MIT-BIH Arrhythmia Database</strong></span><br />The most famous <a href="http://physionet.incor.usp.br/physiobank/database/mitdb/">ECG arrhythmia database</a>!BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-51721153116868913362011-05-11T14:57:00.003+02:002011-05-11T15:08:54.782+02:00Worker Threads!Many times you need to call a function/method that does some really heavy work. However, you don't want this function call to block your main application. You want to maintain a responsive GUI, for example!<br /><br />This famous problem has a solution using multi-threading. From my background in the C++ Qt framework, I know the basic principles involved. And there is a very famous Qt example that explains how this "Worker Thread" solution can be implemented: <a href="http://doc.qt.nokia.com/latest/threads-mandelbrot.html">The Madelbrot Example</a><br /><br />Today I wanted to solve the same problem but in the C# (.Net Framework) context. Fortunately, the MSDN had a similar example that illustrates the solution to this problem, making use of the <a href="http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k%28SYSTEM.COMPONENTMODEL.BACKGROUNDWORKER%29&rd=true">BackgroundWorker </a>class:<br /><a href="http://msdn.microsoft.com/en-us/library/hybbz6ke.aspx">http://msdn.microsoft.com/en-us/library/hybbz6ke.aspx</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-13816846475364320572011-05-11T14:47:00.002+02:002011-05-11T14:54:53.427+02:00Reading and Writing .Net Applications SettingsSometimes you have to deal with the .Net framework in a way or another. I was forced to use a .Net C# closed-source library. And that library was automatically reading file paths from ConfigurationManager.AppSettings[]. So, I needed a way to read and modify those settings. Fortunately, <a href="http://www.ajaxline.com/node/258">this post</a> saved my life!<br /><br />To read:<br /><blockquote>string value = ConfigurationManager.AppSettings["oldPlace"];</blockquote><br /><br />To modify/write:<br /><blockquote>System.Configuration.Configuration config =ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);<br /><br /> config.AppSettings.Settings["oldPlace"].Value = "3"; <br /> config.Save(ConfigurationSaveMode.Modified);<br /> ConfigurationManager.RefreshSection("appSettings");<br /></blockquote><br /><br />More information can be retrieved from the MSDN:<br /><a href="http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.appsettings.aspx">http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.appsettings.aspx</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-34759769726159561782011-05-08T18:33:00.005+02:002011-05-08T18:45:03.283+02:00Precision and RecallOne of the most important metrics used in evaluating the performance of binary classifiers is the Precision-Recall curve.<br /><br />From Wikipedia:<br /><br /><blockquote>It is possible to interpret precision and recall not as ratios but as probabilities:<br />* Precision is the probability that a (randomly selected) retrieved document is relevant.<br />* Recall is the probability that a (randomly selected) relevant document is retrieved in a search.</blockquote><br /><br /><br /><br />This page contains some illustrations to better understand the definitions of Precision and Recall:<br /><a href="http://newadonis.creighton.edu/hsl/searching/Recall-Precision.html">http://newadonis.creighton.edu/hsl/searching/Recall-Precision.html</a><br /><br />Also, this paper relates Precision-Recall curves to the Receiver Operator Characteristic curves:<br /><a href="http://www.biostat.wisc.edu/~page/rocpr.pdf">http://www.biostat.wisc.edu/~page/rocpr.pdf</a><br /><br />Finally, this page is further explaining the concepts and elaborating on the F-measure metric that tries to combine Precision and Recall into one measure:<br /><a href="http://streamhacker.com/2010/05/17/text-classification-sentiment-analysis-precision-recall/">http://streamhacker.com/2010/05/17/text-classification-sentiment-analysis-precision-recall/</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-71279806132836293522011-05-05T17:03:00.004+02:002011-05-05T17:30:32.667+02:00Splitting a video into frames using ffmpegI needed a quick way to split a video sequence into its individual frames and save those frames as images. <a href="http://www.ffmpeg.org/">FFmpeg</a> seemed like a good handy solution. And the short answer is to do this:<br /><br /><blockquote>ffmpeg -i inputfile.avi -f image2 image-%07d.png</blockquote><br /><br />This was a solution proposed in <a href="http://stackoverflow.com/questions/3917601/ffmpeg-split-avi-into-frames-with-known-frame-rate">this</a> thread. And for more information you can refer to the <a href="http://www.ffmpeg.org/ffmpeg.html">detailed documentation</a> of FFmpeg.<br /><br />PS: FFmpeg is available on Windows and you can get the installers <a href="http://hawkeye.arrozcru.org/">here</a>. If you just need the executable then download one of the static builds.BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-15312186571976290392009-06-15T15:53:00.006+03:002009-06-15T16:10:42.080+03:00Deadline Email Notifications using Bugzilla Whining FeatureBugzilla is a great project. Yet, customizing it to your needs is an overwhelming task!<br /><br />I was assigned a task that our Bugzilla server should automatically notify the task assignees upon the deadline. After a lot of search and reading, here is what I reached at...<br /><br />First, since our ISP did block our Sendmail server, we needed another way to send emails from Bugzilla... and this post saved my life:<br /><style type="text/css"> <!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } A:link { so-language: zxx } --> </style> <p align="justify"><a href="http://www.dawood.in/bugzilla_alerts_using_gmail.html">http://www.dawood.in/bugzilla_alerts_using_gmail.html</a></p><br /><br /><style type="text/css"> <!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } TT.western { font-family: Monospace; font-size: 10pt; font-weight: bold } TT.cjk { font-size: 10pt } -</style>The perl module Email::Send::SMTP::TLS was installed using the CPAN command: <p align="justify"><tt class="western">perl -MCPAN -e 'install Email::Send::SMTP::TLS'</tt></p> <p align="justify">Then, from the administration, the email service was set to SMTP::TLS as per the instructions in the previous link.</p> <p align="justify">Finally, the bugzilla code was modified as per the instructions, as follows</p> <p align="justify"><tt class="western">/usr/share/perl5/Bugzilla/Mailer.pm</tt></p> <p align="justify"><br /><br /></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western">if ($method eq "SMTP" || $method eq "SMTP::TLS") {</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">my $smtp_server;</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">my $smtp_port;</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">($smtp_server,$smtp_port) = split /:/,Bugzilla->params->{"smtpserver"};</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">push @args, Host => $smtp_server,</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">#username => Bugzilla->params->{"smtp_username"},</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">User => Bugzilla->params->{"smtp_username"},</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">#password => Bugzilla->params->{</tt><tt class="western">"smtp_password"},</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">Password => Bugzilla->params->{"smtp_password"</tt><tt class="western">},</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">Hello => $hostname,</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">Debug => Bugzilla->params->{'smtp_deb</tt><tt class="western">ug'};</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">push @args, Port => $smtp_port if($smtp_port);</tt></p> <p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"> </tt><tt class="western">}</tt></p><p style="margin-left: 0.03cm; text-indent: -0.05cm;" align="justify"><tt class="western"><br /></tt></p><br /><br />Now I have a Bugzilla system that can send emails... well, what about automated notifications? The whining feature came into play...<br /><br /> <meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"> <title></title> <meta name="GENERATOR" content="OpenOffice.org 3.0 (Unix)"> <style type="text/css"> <!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } A:link { so-language: zxx } TT.western { font-family: Monospace; font-size: 10pt; font-weight: bold } TT.cjk { font-size: 10pt } --> </style> <p align="justify">The whining feature was used to automatically notify the users about deadlines. The was inspired by the instructions in the following links (instructions of Marc):</p> <p align="justify"><a href="http://markmail.org/message/2y67gfpa2ocu7ewa">http://markmail.org/message/2y67gfpa2ocu7ewa</a></p> <p align="justify"><a href="http://groups.google.com/group/mozilla.support.bugzilla/browse_thread/thread/87159cba2d617553">http://groups.google.com/group/mozilla.suppo</a><a href="http://groups.google.com/group/mozilla.support.bugzilla/browse_thread/thread/87159cba2d617553">rt.bugzilla/browse_thread/thread/87159cba2d617553</a></p> <p align="justify"><br /><br /></p> <p align="justify">The whining feature relies on Saved Searches. A 'saved search' is to be created and the search should be done for every member of a group. To execute the saved search for everybody, a group should be created that contains all the users of Bugzilla. This could be done by using the user RegExp '.*'.</p> <p align="justify">Then, the Save Search 'Tasks due soon' was created. It searches all the products for bugs that are open (NEW, ASSIGNED, REOPENED). Then the advanced search (boolean charts) was used to search for only the bugs for which the current user is assigned (Assignee 'is equal to' '%user%') or cc'ed (CC 'is equal to' '%user%'). This was done using the bugzilla Pronoun Substitution feature (<a href="http://www.bugzilla.org/docs/2.20/html/query.html">http://www.bugzilla.org/docs/2.20/html/query.html</a>). In addition, the bug should have its deadline due soon or overdue (Deadline 'is less than' '+3d'). The final saved search looks like this:</p> <p align="justify"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjONPO9i_xPD5HUpixWJju5spgoEB1cPplWMwRmrUEccahc3j5yGRMO-VoSgmz5Idv0NNJqa6HGtxRr32pk2yoVc7LkwmpJvhxNafkjm37VQprsfxvBguRiOEtftZu2Rea9-ne1uxzTh7lp/s1600-h/1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 112px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjONPO9i_xPD5HUpixWJju5spgoEB1cPplWMwRmrUEccahc3j5yGRMO-VoSgmz5Idv0NNJqa6HGtxRr32pk2yoVc7LkwmpJvhxNafkjm37VQprsfxvBguRiOEtftZu2Rea9-ne1uxzTh7lp/s400/1.png" alt="" id="BLOGGER_PHOTO_ID_5347540021822109554" border="0" /></a></p> <p align="justify"><br />Finally, from the Whining feature in administration, all the pieces were put together as follows:</p><p align="justify"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4n4uEutP-TsDHJhuBQOh3uJ1bgRweu2eTIbKCnHmhWcCf5OIULyuJ6vIV4C5Yj4XRUvbAJWBtIfJNAOGbFdEoAfJ6USgcoWEGKyE9yaHm-EPF1GkHiXkUlP4zrvjpaYPTNg1WsBUt3KUh/s1600-h/2.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 119px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4n4uEutP-TsDHJhuBQOh3uJ1bgRweu2eTIbKCnHmhWcCf5OIULyuJ6vIV4C5Yj4XRUvbAJWBtIfJNAOGbFdEoAfJ6USgcoWEGKyE9yaHm-EPF1GkHiXkUlP4zrvjpaYPTNg1WsBUt3KUh/s400/2.png" alt="" id="BLOGGER_PHOTO_ID_5347540098892488786" border="0" /></a></p> <p align="justify"></p> <p align="justify">In sum, the saved search entitled 'Tasks due soon' should be run 'Each day' 'at 15:00' for every member of the group 'everybody' and the search results should be sent 'one message per bug' to the '%user%'.</p> <p align="justify">One question may arise, since we are running the search for all the users, how did we guarantee that the email will be sent to the bug assignee only and not to everybody? This was done using the Pronoun Substitution feature of Bugzilla. Basically, '%user%' is being automatically substituted for by the current user for which the search is done. So, if the current user is not the assignee or on the CC of the bug, there will be no search results, and consequently, there will be no emails sent!</p> <p align="justify"><br /><br /></p> <p align="justify">We are not done yet! One final thing needs to be done. Add the <tt class="western">whine.pl</tt> to your hourly <tt class="western">cron</tt>, so that <tt class="western">cron</tt> would automatically run the <tt class="western">whine.pl</tt> script and Bugzilla start whining. This was done by adding a script '<tt class="western">bugzilla3</tt>' under '<tt class="western">/etc/cron.hourly/</tt>' on a Debian Lenny system. The script was adopted from the '<tt class="western">bugzilla3</tt>' script under '<tt class="western">/etc/cron.daily/</tt>'. Its code is:</p> <p align="justify"><br /><br /></p> <p align="justify"><tt class="western">#!/bin/sh</tt></p> <p align="justify"><br /><br /></p> <p align="justify"><tt class="western">set -e</tt></p> <p align="justify"><br /><br /></p> <p align="justify"><tt class="western">umask 022</tt></p> <p align="justify"><br /><br /></p> <p align="justify"><tt class="western">doit()</tt></p> <p align="justify"><tt class="western">{</tt></p> <p align="justify"><tt class="western"> </tt><tt class="western">if [ -f /usr/share/bugzilla3/lib/whine.pl ] ; then</tt></p> <p align="justify"><tt class="western"> </tt><tt class="western">su www-data -c /usr/share/bugzilla3/lib/whine.pl</tt></p> <p align="justify"><tt class="western"> </tt><tt class="western">fi</tt></p> <p align="justify"><tt class="western">}</tt></p> <p align="justify"><br /><br /></p> <p align="justify"><tt class="western"># process the main configuration: /etc/bugzilla3</tt></p> <p align="justify"><tt class="western">doit</tt></p> <p align="justify"><br /><br /></p> <p align="justify"><tt class="western">exit 0</tt></p> <p align="justify"><br /><br /></p> <p align="justify">That is all!</p>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com3tag:blogger.com,1999:blog-6839450239155226722.post-62621178441712953012009-03-25T22:26:00.002+02:002009-03-25T22:32:40.240+02:00Sound in GNU Octave on Debian LennyI was very disappointed by the poor sound capabilities of the GNU Ocatve project compared to MATLAB. The <span style="font-family: courier new;">playaudio()</span> function was inconvenient with nasty '<span style="font-family: courier new;">/dev/dsp device or resource busy</span>' messages. This was until I installed the octave-audio package in Debian and had the powerful<span style="font-family: courier new;"> sound()</span> and <span style="font-family: courier new;">soundsc()</span> functions working.<br /><br />The nasty thing is that those functions didn't work out of the box. They needed to call a <span style="font-family: courier new;">play</span> command from the shell. Finally, I discovered that this command is part of the <span style="font-family: courier new;">sox</span> package on Debian. I <span style="font-family: courier new;">apt-get install sox</span> and now, <span style="font-family: courier new;">sound()</span> and <span style="font-family: courier new;">soundsc()</span> are working perfectly!BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com4tag:blogger.com,1999:blog-6839450239155226722.post-35440409145432757562009-03-19T23:55:00.004+02:002009-03-24T14:17:24.492+02:00Installing OpenOffice.org 3.0 on Debian Lenny (stable)There is no OpenOffice.org 3.0 in lenny-backports till now and I need it! So, I grabbed it from sid (unstable). This discussion helped me a lot:<br /><a href="http://www.linuxquestions.org/questions/debian-26/openoffice-3-in-debian-lenny-679610/">http://www.linuxquestions.org/questions/debian-26/openoffice-3-in-debian-lenny-679610/</a><br /><br />In short, you need to<br /><br /><ol><li>add to your repositories (/etc/apt/sources.list)<br /><pre class="code">deb http://www.backports.org/debian lenny-backports main contrib non-free</pre></li><li>Also add to your repositories<br /><pre class="code">deb http://http.us.debian.org/debian sid main</pre></li><li>To stay with the stable and not install packages from unstable by default, we need to add the following to /etc/apt/apt.conf <span style="font-size:78%;"><span style="font-family:courier new;">APT::Default-Release "stable";</span></span><br /><br /></li><li>Then do <span style="font-size:78%;"><span style="font-family:courier new;">aptitude install openoffice.org/unstable</span></span></li></ol><span style="font-family:courier new;"><br /><span style="font-family:verdana;">Voila! Hope it does not break your system!</span><br /><br /><span style="font-family:verdana;">UPDATE: OpenOffice.org is now available in Lenny-backports. Now you do not need step 2. So, instead type</span> aptitude install openoffice.org/lenny-backports<br /></span>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-7926134674515016252009-03-03T17:38:00.002+02:002009-03-03T17:51:01.862+02:00The long-waited Qt 4.5 Released :)Qt 4.5 is now officially released.<br /><a href="http://www.heise.de/english/newsticker/news/133888">http://www.heise.de/english/newsticker/news/133888</a><br /><a href="http://doc.trolltech.com/4.5/">http://doc.trolltech.com/4.5/</a><br /><br />With the LGPL v2.1 licensing option added, I expect the widespread adoption of Qt into commercial applications!<br /><br />Qt 4.5 is even better suited for the medical field, combining reliability, performance, flexibility, nice look-and-feel, among other advantages.<br /><br />Qt 4.5 now has -graphicssystem command-line option to switch the graphics engine of Qt applications to raster or even OpenGL without any change to the code. Yes, your application can draw itself using OpenGL without requiring you to change a single line of code, check:<br /><a href="http://labs.trolltech.com/blogs/2008/10/22/so-long-and-thanks-for-the-blit/">http://labs.trolltech.com/blogs/2008/10/22/so-long-and-thanks-for-the-blit/</a><br /><br />Moreover, you can have a custom widget plotting itself using OpenGL without requiring the rest of the application to use OpenGL, check:<br /><a href="http://labs.trolltech.com/blogs/2008/06/27/accelerate-your-widgets-with-opengl/">http://labs.trolltech.com/blogs/2008/06/27/accelerate-your-widgets-with-opengl/</a><br /><br />The LGPL v2.1 has one drawback regarding the use of templates in C++, check:<br /><a href="http://lab.obsethryl.eu/content/lgpl-21-qt-45-and-c-templates">http://lab.obsethryl.eu/content/lgpl-21-qt-45-and-c-templates</a><br />However, it is <a href="http://labs.trolltech.com/blogs/2009/01/14/nokia-to-license-qt-under-lgpl/">stated on the Qt Labs Blogs</a> that Nokia is working on an LGPL exception to overcome this problem. Let's wait and see :)<br /><br />With a framework so powerful and flexible like Qt, one can ask: Are we watching the dawn of Qt and the sunset of Java and .Net??BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-14633808223303354032009-02-17T05:04:00.002+02:002009-02-17T05:14:05.523+02:00Adding PDF headers, footers, and watermarks in GNU/LinuxRecently I needed to add a header/footer to an existing PDF file. With some help from this link, I figured it out:<br /><a href="http://coding.derkeiler.com/Archive/Perl/comp.lang.perl.misc/2005-04/msg00151.html">http://coding.derkeiler.com/Archive/Perl/comp.lang.perl.misc/2005-04/msg00151.html</a><br /><br />First, use OpenOffice.org Writer (for example) to generate a single-page PDF file that has the needed header/footer/watermark.<br /><br />Second, use pdftk's background option. Quoting from the man page of pdftk:<br /><br /><blockquote style="font-family: courier new;">pdftk in.pdf background back.pdf output out.pdf</blockquote><br />the <span style="font-family: courier new;">back.pdf</span> is the file you created that has the needed header/footer/watermark. The <span style="font-family: courier new;">in.pdf</span> is the file you need to apply header/footer/watermark to. The result, of course, is saved into <span style="font-family: courier new;">out.pdf</span>.<br /><br />You can also use the dual option <span style="font-family: courier new;">stamp</span> instead of <span style="font-family: courier new;">background</span>. This will overlay the <span style="font-family: courier new;">back.pdf</span> on top of every page of <span style="font-family: courier new;">in.pdf</span>.BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com4tag:blogger.com,1999:blog-6839450239155226722.post-38849170630921512392009-02-15T12:54:00.002+02:002009-02-15T13:00:39.037+02:00Debian Lenny is out... at last!Debian 5.0 (codenamed "Lenny") is out. Check:<br /><a href="http://www.desktoplinux.com/news/NS4199843436.html">http://www.desktoplinux.com/news/NS4199843436.html</a><br /><span style="font-family:Arial,Helvetica;font-size:100%;"><blockquote>It appears that Debian 5.0 (aka "Lenny") will soon take its big binocular<span><span style="font-family:Arial,Helvetica;font-size:100%;"><span><span style="font-family:Arial,Helvetica;font-size:100%;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.desktoplinux.com/files/misc/pixar_toy_story_lenny_cap-thm.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 125px; height: 94px;" src="http://www.desktoplinux.com/files/misc/pixar_toy_story_lenny_cap-thm.jpg" alt="" border="0" /></a></span></span></span></span> eyes out into the wider world. The Debian project has completed the first release-candidate of Lenny's installer, which features much-improved support for ARM-based devices, along with much faster installation from "live" CDs</blockquote></span><br /><br /><br />The next stable release of Debian is codenamed "Squeeze". Check:<br /><a href="http://www.debiantoday.com/debian-lenny-successor-gets-named/">http://www.debiantoday.com/debian-lenny-successor-gets-named/</a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://upload.wikimedia.org/wikipedia/en/thumb/c/cf/Squeezetoyalien.jpg/180px-Squeezetoyalien.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 180px; height: 135px;" src="http://upload.wikimedia.org/wikipedia/en/thumb/c/cf/Squeezetoyalien.jpg/180px-Squeezetoyalien.jpg" alt="" border="0" /></a><blockquote>Prepare yourself for <strong style="font-weight: normal;">Squeeze</strong>, that’s right the little green guy. Continuing with the Toy Story names the Debian project has decided to name the next release in the line up after the three eyed green alien who fears “the claw” at Pizza Planet in the movie Toy Story</blockquote>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-65282754567169986462009-02-10T14:11:00.005+02:002009-02-10T17:06:07.416+02:00Free Books on "Design Patterns in C++" and QtToday is my lucky day :)<br /><br />I found two free books about Qt and Design Patterns.<br /><br />The first book is<br /><a href="http://www.amazon.com/gp/product/0131872494">C++ GUI Programming with Qt 4</a><br /><br />The first edition of this book could be downloaded _legally_ for free here:<br /><a href="http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip">http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip</a><br /><a href="http://www.qtrac.eu/marksummerfield.html">http://www.qtrac.eu/marksummerfield.html</a><br /><br /><br />The second book is a magnificent one. It is the first book I see to explain C++ and Design Patterns in a Qt-ish style!<br /><br />The book is free as in freedom! It is released online under the Open Publication License (OPL) here:<br /><a href="http://oop.mcs.suffolk.edu/opensource/">http://oop.mcs.suffolk.edu/opensource/</a><br /><br />This is NOT a book, it is a complete PROJECT that I think people should actively contribute to... The bugzilla server for this project and many useful materials could be found here:<br /><a href="http://cartan.cas.suffolk.edu/moin/OopDocbook">http://cartan.cas.suffolk.edu/moin/OopDocbook</a><br /><br /><br />For convenience, you can download the whole book compiled into chm format here:<br /><a href="http://lawand.wordpress.com/site-map/computer-science/e-books/introduction-to-design-patterns-in-cpp-with-qt-4/">http://lawand.wordpress.com/site-map/computer-science/e-books/introduction-to-design-patterns-in-cpp-with-qt-4/</a><br /><br />Enjoy the cute Qt!BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com2tag:blogger.com,1999:blog-6839450239155226722.post-44685348683722001392009-01-25T21:08:00.000+02:002009-01-25T21:09:44.812+02:00An open source self-balancing robotWhat a nice project!<br /><br /><a href="http://www.mtoussaint.de/tobb/index.html">http://www.mtoussaint.de/tobb/index.html</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-73603801127532500162009-01-25T18:53:00.000+02:002009-01-25T18:55:15.413+02:00Interesting: The Evolution of Tech Companies’ LogosI just got this from a friend :)<br /><a href="http://www.neatorama.com/2008/02/07/the-evolution-of-tech-companies-logos/">http://www.neatorama.com/2008/02/07/the-evolution-of-tech-companies-logos/</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com1tag:blogger.com,1999:blog-6839450239155226722.post-3501269213319270872008-12-25T22:36:00.004+02:002008-12-25T23:31:47.564+02:00union, struct, and bit fields in C and C++It took me some long time to comprehend the issues involved in using unions, structs, and bit fields in C and C++.<br /><br />First, for the definition of unions and structs, take a look at this link:<br /><a href="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/strct.htm">http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=/com.ibm.xlcpp8a.doc/language/ref/strct.htm</a><br /><br />Unions could be used together with structs to reinterpret the same location in memory with different interpretations (similar in spirit to the C++ reinterpret_cast). For examples on this see:<br /><a href="http://www.anyexample.com/programming/cplusplus/example_of_using_union_in_cplusplus.xml">http://www.anyexample.com/programming/cplusplus/example_of_using_union_in_cplusplus.xml</a><br /><br />C++ extends the unions and structs, for example see:<br /><a href="http://www.yolinux.com/TUTORIALS/LinuxTutorialC++Structures.html">http://www.yolinux.com/TUTORIALS/LinuxTutorialC++Structures.html</a><br /><br />Bit fields are used to define special-sized integers. This is useful for packing data (e.g. flags) together into one memory location. This, however, is a bad habit and should be avoided as the compiler-generated code to access bit fields is usually inefficient! For more examples on this, see:<br /><a href="http://en.wikipedia.org/wiki/Bit_field">http://en.wikipedia.org/wiki/Bit_field</a><br /><a href="http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/language/ref/clrc03defbitf.htm">http://publib.boulder.ibm.com/infocenter/macxhelp/v6v81/index.jsp?topic=/com.ibm.vacpp6m.doc/language/ref/clrc03defbitf.htm</a><br /><a href="http://www.cs.cf.ac.uk/Dave/C/node13.html">http://www.cs.cf.ac.uk/Dave/C/node13.html</a><br /><a href="http://www.daniweb.com/forums/thread55765.html">http://www.daniweb.com/forums/thread55765.html</a><br /><a href="http://blogs.msdn.com/oldnewthing/archive/2008/11/26/9143050.aspx">http://blogs.msdn.com/oldnewthing/archive/2008/11/26/9143050.aspx</a><br /><a href="http://osr507doc.sco.com/en/tools/ANSI_F.3.9_Structs.unions.html">http://osr507doc.sco.com/en/tools/ANSI_F.3.9_Structs.unions.html</a><br /><br />Finally, unions and structs could be anonymous! You do not have to give a name to a union. In this case its members become directly accessible within the same scope. Wikipedia calls this "untagged union". For an example see:<br /><a href="http://www.velocityreviews.com/forums/t286529-union-with-anonymous-struct.html">http://www.velocityreviews.com/forums/t286529-union-with-anonymous-struct.html</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-71603500175360810322008-12-23T19:24:00.003+02:002008-12-23T19:54:16.555+02:00Debugging, Profiling, Memory Leaks and more!I have been searching for open source tools to assist in detecting memory leaks and application profiling. Also, static code analysis was another goal.<br /><br />For static code analysis I found:<br />CppCheck (<a href="http://en.wikipedia.org/wiki/Cppcheck">http://en.wikipedia.org/wiki/Cppcheck</a>)<br /><br />I used it to its full power by invoking (at the top level of the project):<br /><br /><span style="font-family:courier new;">cppcheck --recursive --all --errorsonly --style</span><br /><br />Also, SPlint (<a href="http://en.wikipedia.org/wiki/SPlint">http://en.wikipedia.org/wiki/SPlint</a>) seems promising, though it is for C code only (no C++).<br /><br />A comprehensive list of static code analysis could be found in Wikipedia:<br /><a href="http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis">http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis</a><br /><br />About application profiling, the GNU Profiler (gprof) does a good job. It is light-weight and has support in GCC. This is an excellent article about using gprof:<br /><ul><li>Programmer's Toolkit: Profiling programs using gprof(<a href="http://linuxgazette.net/100/vinayak.html">http://linuxgazette.net/100/vinayak.html</a>)</li></ul>Of course, you can best visualize the output of gprof using the (kprof) KDE front-end.<br /><br />Memory leak detection has many options. Of the best is using Valgrind(<a href="http://valgrind.org/">http://valgrind.org/</a>). However, I found an interesting and promising feature that has been added to the gcc. This feature is called Mudflap. It is easy to use as a compiler flag and adds memory debugging support directly into your application using libmudflap. More interesting information could be found here:<br /><a href="http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging">http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging</a><br /><a href="http://gcc.fyxm.net/summit/2003/mudflap.pdf">http://gcc.fyxm.net/summit/2003/mudflap.pdf</a><br />It is so promising that it will be integrated into the QNX IDE:<br /><a href="http://qnxdevtools.blogspot.com/2008/02/mudflap.html">http://qnxdevtools.blogspot.com/2008/02/mudflap.html</a><br />It can print the memory leaks on program exit via the (<span style="font-family:courier new;">-print-leaks</span>) option<br /><br />Memory debugging tools are so many. There is a list on Wikipedia article:<br /><a href="http://en.wikipedia.org/wiki/Memory_debugger">http://en.wikipedia.org/wiki/Memory_debugger</a><br /><br />The task of memory leak detection is achievable using lightwieght tools. These tools basically replaces the default C library malloc() and free() with special debugging implementations. Notable is mtrace(), the memory debugger built in the GNU C library:<br /><a href="http://en.wikipedia.org/wiki/Mtrace">http://en.wikipedia.org/wiki/Mtrace</a><br /><br />A good article about memory leak detection in C++:<br /><a href="http://www.linuxjournal.com/article/6556">http://www.linuxjournal.com/article/6556</a><br /><br />And finally, all what you can dream of are collected in one article, in the GRASS wiki here:<br /><a href="http://josef.fsv.cvut.cz/WIKI/grass-osgeo/index.php/GRASS_Debugging">http://josef.fsv.cvut.cz/WIKI/grass-osgeo/index.php/GRASS_Debugging</a><br /><br /><br />Hope you find this useful!BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-54251725006272123292008-12-22T18:37:00.001+02:002008-12-22T18:39:00.823+02:00Guide to start using Linux in ARABICThis an excellent piece of work. This book, written in ARABIC, will get you started with using Ubuntu Linux in no time! Get started now:<a href="http://ia310803.us.archive.org/2/items/Practical_Guide_to_use_ubuntu_linux_Arabic_344/Practical_Guide_to_use_ubuntu_linux_arabic.pdf"><br />http://ia310803.us.archive.org/2/items/Practical_Guide_to_use_ubuntu_linux_Arabic_344/Practical_Guide_to_use_ubuntu_linux_arabic.pdf</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-1866523640430601272008-11-12T15:49:00.000+02:002008-11-12T15:51:30.977+02:00Egyptian Universities Library!!I couldn't believe it... Check the EUL website NOW<br /><a href="http://www.eul.edu.eg">www.eul.edu.eg</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0tag:blogger.com,1999:blog-6839450239155226722.post-66880967223193630342008-10-16T19:40:00.000+02:002008-10-16T19:41:50.031+02:00The possesive 'sVery informative!<br /><br /><a href="http://www.bbc.co.uk/worldservice/learningenglish/grammar/learnit/learnitv57.shtml">http://www.bbc.co.uk/worldservice/learningenglish/grammar/learnit/learnitv57.shtml</a>BioEng Studenthttp://www.blogger.com/profile/18249832615346551685noreply@blogger.com0