OpenStruct is a nice tool to work with. However…
Let’s say you do this:
user = OpenStruct.new( :name => "Franca Botanica", :uid => "777" ) address = OpenStruct.new( :user => user, :country => "Paraguay" ) some_stuff = [] some_stuff << user some_stuff << address and now you want to iterate over the some_stuff collection and want to dump all those “containers” you created. But how do you find out which fields those OpenStruct instances have?
Read on
When I run the statically bound Mojotron executable, as downloadable from sourceforge under Ubuntu Interpid, then it doesn’t recognize the arrow/cursor keys. I.e. changing the direction of the shots is not possible.
This can be “taken care of” by changing the Mojotron configuration file:
$ diff -u ~/.mojotronrc.orig ~/.mojotronrc --- .mojotronrc.orig 2009-04-13 12:43:57.000000000 +0200 +++ .mojotronrc 2009-04-13 12:44:43.000000000 +0200 @@ -8,11 +8,11 @@ section Player1 { usekey = 62 (type=integer); movement = wasd (type=string); - aiming = cursorkeys (type=string); + aiming = ijkl (type=string); } Tomáš Pospíšek
Read on
Sourcepole war an der FOSSGIS vom 17.-19. März 2009 an der Leibniz-Universität in Hannover mit dem Vortrag “Kartenaufbereitung für Tile Map Services mit Cloud Computing” vertreten. Die Folien stehen hier zum Download zur Verfügung.
Read on
Some of the more or less officially recommended documents describing how to set up SMTP time spam scanning suggests calling (?) Spamassasin from Exim as user “nobody”.
However under Debian the User nobody intentionally has no home directory and thus, depending on how you’ve set up Exim4 and Spamassassin, Spamassassin will try to save its settings in its $HOME, resulting in the following error (visible in /var/log/mail.log):
Mar 2 09:55:59 mail spamd[4896]: config: cannot write to /nonexistent/.
Read on
After importing a CSV document (comma separated table) there were sequences of litteral “<13><10>” text in some of the cells in Openoffice.
What you need to do is to replace them by a newline with a text editor, before importing them n Openoffice.
In vim you do that by opening the file, marking the whole document with “V0G”, and then replacing all the occurences of “<13><10>” with a newline by issuing “:s/<13><10>/Ctrl-VEnter/a”, where Ctrl-V is pressing down the Ctrl key and then the ‘v’ key and Enter is pressing the “Enter” key.
Read on