Archive for the 'googlefood' Category

Compiling Afner fails with gcc 4.5+

Friday, August 26th, 2011

WARNING: Googlefood, thus boring…

Issue: Afner compiled fine with GCC 4.4, but when trying to compile Afner with GCC 4.5 or later, the compilation dies with:


suffixtree.h:66:14: error: class ns_suffixtree::suffixtree::node is protected
suffixtree.cpp:208:19: error: within this context
suffixtree.cpp:208:1: error: ns_suffixtree::suffixtree::node::node names the constructor, not the type

Problem: Between GCC 4.4 and 4.5, the compiler changed to support “specializing C++ constructor templates.” This caused the meaning of “class X::Y::Y” to change.

Fix: Edit src/suffixtree.cpp, and at line 208: change suffixtree::node::node * to suffixtree::node * (i.e. delete the trailing ::node.)

I would have sent it upstream, but Afner doesn’t appear to be under development any more, there’s no open repo that I can check if this is already fixed and just not released yet, and I don’t really want to take responsibility for forking the project just to fix one line. :)

Note that the general fix should work for any “X::Y::Y names the constructor, not the type” error – Drop the duplicate ::Y. Of course, your mileage will undoubtedly vary.

References:

How to find which linux distribution you are running from a shell script

Friday, June 10th, 2011

sed -n -e ‘s/ *(.*)//g’ -e ‘s/ /-/g’ -e ’1p’ /etc/issue

Examples:

nethead2:$ sed -n -e 's/ *(.*)//g' -e 's/ /-/g' -e '1p' /etc/issue
Scientific-Linux-release-6.0

dhollowa-106$ sed -n -e 's/ *(.*)//g' -e 's/ /-/g' -e '1p' /etc/issue
CentOS-release-5.6

Japanese: 見える vs. 見られる

Saturday, September 25th, 2010

Since I spent an hour figuring out the difference between mieru and mirareru today…

  • 見る: (miru) To see
  • 見られる: (mirareru; potential form) To be able to see
  • 見える: (mieru: ??? form) Has the state in which the potential to be seen exists.

Examples:

  • 海を見ます:
    • I see the ocean.
  • あの山の上に海が見える:
    • From the top of that mountain, the ocean can be seen.
  • あの山は上りましたので、海が見られました:
    • Because I climbed that mountain, I was able to see the ocean.

Or, more succinctly, a human does mirareru; an object does mieru ;)

Cognos tools fail to start up

Monday, September 13th, 2010

Note: This is a googlefood post: It is of no interest to casual readers. Also please note that I am in NO WAY a Cognos or Windows expert – This was simply a problem that I had for which I was unable to find a good solution on the web.

I eventually discovered I had to swing the dead raccoon with my right hand while chanting in Lower Slobenian… To save you that trouble, here’s how I fixed my issue…

(more…)

Matching beats per minute and frame number

Tuesday, December 1st, 2009

Googlefood only…

(more…)