I'm currently evaluating Zimbra as my webmail client. It looks pretty nice and even has keyboard shortcuts.
However, the listings available on the net seem to be outdated or not match with my configuration, so I copied the listing from the Preferences dialog and put them on a cheat sheet, that you can download here: Zimbra Keyboard Shortcuts (PDF).
I needed to plot data from a program in real-time for a demo, that is, as the program generates the data, I wanted it to show in some nice diagram.
A friend pointed me to Visualize real-time data streams with Gnuplot by Thanassis Tsiodras, which is very nice: you specify the number of streams to plot and where to plot them, and feed it with lines like '0:1.23', '1:2.3', etc. defining the data points for the individual streams (here: first point on stream 0 is 1.23, first point on stream 1 is 2.3, etc.).
However, I needed to plot several streams in a single window, which that version lacked. So I extended that program with the ability to plot several streams into a single window (download).
For this, you specify both the number of streams you want to plot and the number of windows you want to show. Furthermore, you specify in which window each stream is plotted. I kept as much as possible of the original command line interface to ease the transition to this new version. The result looks like this:
I've just updated the documentation of SystemC 2.2.0. It includes more graphs, the source code of the .cpp files, and I turned the comments of some functions to doxygen comments which now show up in the docs. I plan to update the docs with more documented functions (the original source contains only simple comments instead of doxygen comments).
I wanted to 'upgrade' my python from 2.5 to 2.6 on Ubuntu. Unfortunately, I could not find .deb packages for Ubuntu. Fortunately, the Python 2.6 sources(sig) are available, so I can compile it from source. Here's what I had to do to get it running. (Short version: apt-get build-dep python2.5 and apply this patch to disable unavailable and outdated modules.)
gvim will spell-check your file and underline wrongly spelled words with a red line much like you know it from OpenOffice. If you
:set mousemodel=popup
you can even right click on any misspelled word to get a list of suggested corrections.
However, this sometimes did not work for me. I could not figure out a reason, until I read the help docs again, which clearly say:
Note for GTK: don't release the right mouse button until the menu appears,
otherwise it won't work.
They actually mean what they say: if I release the right mouse button too fast, the menu appears, but it does not replace the misspelled word with the corrected word. Only if keep the right mouse pressed until the menu appears, it works, for whatever reason. RTFM!
While this seems to argue against installation of CCTV cameras, there are several interesting points brought up in the discussion on slashdot, though.
Concerning the 3% figure, noa points out that it does not say anything about how much crime the cameras prevented, the reason why they were installed in the first place.
The basis for CCTV cameras is law enforcement, so mi asks whether we want 100% law enforcement to which ShieldW0lf answers yes, but only if 99% of the laws are abolished. mi also points out that cameras can help protect citizens against police violience, as happened in Philadelphia.
On the other hand, Wowsers reports that a camera could not help find a guy assaulting a woman, because the camera was used to catch motorists using the wrong lane, presumably because this gives money to the city.
Even worse, the cameras are sometimes used for spying, as Toreo asesino reports. He was making out with a girl in a park and observed a camera being pointed to him.
Thank you, slashdot, for your great discussion system. On a personal note, I don't think CCTV is a cure for everything. It may help in some cases (say banks), but most often it will only invade people's privacy and satisfy the curiosity of some (unknown) security people while pushing crime to other, non-monitored areas. More intelligent software, as the Guardian article suggests, won't help here.
If you link a static library to your executable, the GNU linker ld (as many others) only adds those symbols that ld thinks are actually used in your executable (that's a feature). Unfortunately, ld can only check if the symbol is in use, but not if the side effects of the symbol's initialization is used. Thus, your program will fail if it depends on the initialization of an unused static object.
In my case, I have a factory (class module::factory<T> : public factory_plant {...} factory;) at which classes can register themselves with a name (module::factory<Group> f("Group")). If I call the factory with a name (factory.create("Group")), the factory returns a pointer to a newly created class associated with that name. The class registers itself via a static object (here: f) whose initialization code does the actual registration.
The problem arises if the class is not used directly and the linker throws the static object away. The registration does not happen and thus I can't use the factory to create an object of the class. There are several possibilities to work around this feature:
Use --whole-archive to tell the linker to include all symbols, no matter what (with gcc use -Wl,--whole-archive -lmylib -Wl,--no-whole-archive). The drawback is that symbols that I neither use nor care about are also included, resulting in increased code size.
Use -u<symbol> to tell the linker to treat <symbol> as if undefined and thus include it in the executable, even it is not used. The drawback here is to know what <symbol> looks like. Easy for C files, difficult (and not portable) for C++ files (see Name mangling in Wikipedia).
Use static initializers (thanks to Alex for this). This is my preferred method. I use a throw-away class, which I add to the header file:
Johnny Lee strikes again. After using the Wii remote to create a low cost multi-touch whiteboard he uses the Wii remote to implement head tracking and 3D virtual reality. He coupled the Wii remote with a PC and a monitor which displays the 3D world. Thanks to the 3D processors in our brain (and the normal processors in Lees computer), we get an impressive illusion of three dimensionality with objects sticking out of the TV. You can even look into a football stadium as if you look through a window: lean to the right and you see more of the field, lean to the left and you see more of the audience.
However, it works only for a single person (and I guess you need a pretty big TV screen such as the one Lee owns to enjoy this 3D experience. ) Great work!
I learned Scheme in my first semester at university and I liked it right away for its clearity and flexibility. However, I stopped using Scheme for my everyday tasks some long time ago. Recently, I wanted to practice some Scheme again a little bit and I thought, I could come back to scsh, which we used in the lectures, to write some small script that does something similar to rsync. Given that I wrote some fairly large applications in scsh, I thought practicing will be smooth.
However, turning back to scsh reminded me of why I stopped using scsh as a scripting language (as opposed to programming language or Scheme implementation).
I've just found a nice, small C compiler: tinycc. The compiler includes the actual compiler and the linker, so you don't need other external tools. The executable is only 122KB in size on my system (Fedora Core 6). I like tcc because it allows you to create C-scripts.
Jake Voytko posted an interesting article on string searching algorithms. He presented the three algorithms brute force, Boyer-Moore, and Rabin-Karp. However, his implementation has two small bugs and the Rabin-Karp can be improved considerably.
That's really cool: Johnny Lee uses the Wii remote to create a low-cost multi-touch screen, either on a whiteboard or your laptop or any other surface you like. You can even download his software at his homepage. That's great, check it out!