Study online

MIT releases publicly it’s classes since a long time, under the initiative OpenCourseWare.

To MIT have nowadays followed both the campuses of Berkley and Stanford with the initiatives Webcast and Stanford Engineering Everywhere.

These are websites to absolutely keep in your bookmarks and check quite often.

Matlab 7 (R14), Ubuntu 8.04 and GCC 4.x

I recently had the necessity to install Matlab on a Linux machine running Ubuntu 8.04 and I have encountered a few quirks here and there.

First it is a good idea to run unset LANG before running Matlab, otherwise certain GUI components, such as the directory selection modal dialog, will not run properly.

Second, it is necessary to modify the options related to mex, the C (or Fortran) to Matlab interface. The reason is that with GCC 4.x it is no more necessary to link against libstd and trying to do so will cause quite a bit of hassle (you can solve it on Fedora by installing gcc-compat, which is not available on Ubuntu, as far as I know). The solution is then to modify the file ~/.matlab/R14/ and simply remove the -lstdc++ option from the gcc section.

Finally I would suggest to run Matlab from console: KDE does not get along well with it.

Hope this helps.

About ComboBox and Data binding (.NET, C#)

So, it seems like I am not able to post about anything else than IT! 🙂

Anyway, I had this strange problem with the ComboBox control of the .NET 2.0 framework (but I guess the problem would have been manifest with version 1.0/1.1 too):
I had some ComboBoxes that I had been binding to some DataTables generated as the result of some Stored Procedure calls on a DB server. Everything seemed to be working until I tried to set the ComboBox.SelectedValue property manually: disaster happened and nothing worked as it should have.

The reason for this strange behaviour was that I did not add the ComboBoxes to the form Control list BEFORE binding the source!
The worst thing of it all is that I have not been able to find any clue about the order in which these two operations whould be done on the MSDN, nor on various developer forums!

So rememeber:

  • First add the controls to your form
  • And only then you can correctly set the DataSource