Monthly Archives: August 2012

Search E-mails in Thunderbird

My e-mail has been getting a bit out of hand, instead of having an annual clearout at work I’ve left it alone and my sent folder now has 5513 e-mails and I’ve saved 3608 e-mails from various people related to teaching in a “teaching” folder.  This means that getting accurate search results is very important.  Either that or I should use the delete key rather than replying to e-mails….

Thunderbird 14.0 has quite a powerful built in search but the filtering options are not great.  You can search for all e-mails involving “Fred Bloggs” but that returns everything “Fred Bloggs” was copied in on as well as the vital instructions that he sent you two years ago that you are trying to retrieve.

Fortunately there is an extension that you can use: Expression Search / GMailUI this allows you to a box in the quick filter menu to search for e-mails from a particular individual in the folder.  Hitting Ctrl-Enter allows you to search all the folders in a particular account.

In general it works well but is a shame such functionality is not built into the Thunderbird Search by default.

Advertisements

Building PythonNURBS-0.3 on Ubuntu 12.04

This package which provides Python bindings for the nurbs++ library is quite straightforward to build. I obtained the tarball from the project homepage but when I built it I got lots of errors about not being able to find the correct .h files.

I ended up changing the path in the setup.p file from /usr/include to /usr/local/include which is where the default installation of Nurbs++ ended up from yesterday’s post. A simple python setup.py install then did the trick. This seemed to get the thing to build and the examples now run, so it may actually work.

I include the patch if anyone wants it:
--- setup.py.old 2012-08-02 22:05:59.000000000 +0100
+++ setup.py 2012-08-02 22:06:24.000000000 +0100
@@ -43,18 +43,18 @@
ext_package='pythonnurbs',
package_dir={'pythonnurbs':'src'},
package_data={'pythonnurbs':['src/__init__.py']},
- ext_modules = [ Extension("_NurbsColor", ["src/color.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsCurve", ["src/curve.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsMatrix", ["src/matrix.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsBasicArray", ["src/barray.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsArray2D", ["src/barray2d.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsCoordinate", ["src/coordinate.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsHPoint", ["src/hpoint_nd.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsPoint", ["src/point_nd.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsBasicList", ["src/list.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsSurface", ["src/surface.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsVector", ["src/vector.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"]),
- Extension("_NurbsMatrixRT", ["src/matrixRT.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/include"])],
+ ext_modules = [ Extension("_NurbsColor", ["src/color.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsCurve", ["src/curve.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsMatrix", ["src/matrix.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsBasicArray", ["src/barray.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsArray2D", ["src/barray2d.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsCoordinate", ["src/coordinate.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsHPoint", ["src/hpoint_nd.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsPoint", ["src/point_nd.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsBasicList", ["src/list.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsSurface", ["src/surface.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsVector", ["src/vector.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"]),
+ Extension("_NurbsMatrixRT", ["src/matrixRT.i"], libraries=["nurbsd", "matrixN", "matrixI", "matrix"], swig_opts=["-c++", "-I/usr/local/include"])],
data_files = [('share/doc/pythonnurbs-'+Version+'/examples', ['examples/curve01.py', 'examples/interpolation01.py',
'examples/interpolation02.py', 'examples/surface01.py', 'examples/surface02.py', 'examples/test.py',
'examples/vector_double.py']),

Compiling Nurbs++ From Source on Ubuntu 12.04

If you need to compile the nurbs++ library, then the easiest thing to do is to get hold of the PPA in the launchpad system and get the original source and the diffs. Namely:

  • nurbs++_3.0.11.orig.tar.gz
  • nurbs++_3.0.11-8~ppa5~lucid1.diff.gz

You can get the same patches directly from the source-forge site but I found they failed to build when I applied them, though quite probably I did not apply them in the correct order. The successful sequence I found from the PPA download was as follows:

$ tar xvf  nurbs++_3.0.11.orig.tar.gz
$ gunzip nurbs++_3.0.11-8~ppa5~lucid1.diff.gz
$ cp nurbs++_3.0.11-8~ppa5~lucid1.diff ./nurbs++-3.0.11/
$ patch <nurbs++_3.0.11-8~ppa5~lucid1.diff
$ patch <nurbs++-3.0.11-gcc-4.3.patch
$ patch -p1<nurbs++-3.0.11-gcc-4.3.patch
$ patch -p0<nurbs++-3.0.11-gcc-4.4.patch
$ patch -p0<nurbs++-3.0.11-linker.patch
$ ./configure
$ make

I then compiled an ran some of the examples viewing the wrl files using g3dviewer which is in the Ubuntu repositories.