Thursday, March 31, 2011

my Samsung "Color Laser Printer" CLP-315

its US-English web-page.

its German web-page.

The printing quality got worse a couple of months ago – low-colour stripes, where I expected bright colour.

I called support yesterday.
He told me to take everything out (all 4 cartridges, the waster toner (box) (in Geman: Resttonerbehälter), and the other beast (I will tell you its name, once I remember)).
I should shake the cartridges a little.
I should clean "it" (that glass area, where the pictures are captured) with something fluff-free and a little wet.
I should let it dry for a couple of hours.
I should also open and close the cover a couple of times, as that would activate a cleaning mechanism.
I actually went for the dry variant, and I was rather successful. I am rather satisfied now.

Blogger Buzz: Fresh new perspectives for your blog

Blogger Buzz: Fresh new perspectives for your blog

Tuesday, March 29, 2011

Google Contacts as XML – rough edges

Some vCards come with a field called SORT-STRING.

It appears to me (I will update this, once I know better), that Google (Mail) Contacts loads this field into their field by the name of "Name (phonetic)". In XML this goes into an attribute of fullName, that they call yomi.

Monday, March 28, 2011

reverse-engineering ORM class interfaces from RDBMS schemas

I found software to create such interfaces for Perl / in Perl; some such software is oriented towards DBIx::Class, some is oriented towards other approaches. I found that in the books on Catalyst.


Is there any such thing for Ruby? Can ActiveRecord do it?

I find that a rather smart thing. Usually you find a lot of existing schemas (if you are in such a situation), and if you are lucky, you can choose the ORM approach.

To be continued …

DBIx::Cookbook - search.cpan.org

DBIx::Cookbook - search.cpan.org

This text pointed me to the Sakila sample database.

MySQL :: the Sakila sample database

MySQL :: the Sakila sample database

That documentation includes a nice diagram, and that diagram led me to MySQL Workbench, now I have an idea of how to create nice database diagrams.

MySQL Workbench - a general database GUI application

MySQL Workbench - Wikipedia, the free encyclopedia

Why Catalyst is an excellent web application framework - Catalyst::Wiki

Why Catalyst is an excellent web application framework - Catalyst::Wiki

Sunday, March 27, 2011

RubyForge: XML::Simple (with my experiences as updates)

RubyForge: XmlSimple: Project Info

Rather short after discovering this module, I made use of it with my FRITZ!Box call monitor in order to read my Google Contacts as XML. With this approach, that was a rather easy piece of cake.

Update 2011-03-29:
If an element has not attributes, the (text) content of that element simply gets appended as string to the list at the hash field by the name of that element.
Now if the element has attributes, the (text) content goes together with the attributes to a hash list, that gets appended to that list instead. The (text) content actually goes into a hash field by the name of "content".
Example:
text -> "e"=>[            "text"]text -> "e"=>[{"content"=>"text","a"=>"v"}]
My Ruby code operates like this:
x.instance_of?(Hash) ? x['content'] : x

ruby XML::Simple

XmlSimple - XML made easy

Saturday, March 26, 2011

Catalyst 5.8: the Perl MVC Framework Book & eBook | Packt Publishing Technical & IT Book Store

Catalyst 5.8: the Perl MVC Framework Book & eBook | Packt Publishing Technical & IT Book Store

Catalyst Book & eBook | Packt Publishing Technical & IT Book Store

Catalyst Book & eBook | Packt Publishing Technical & IT Book Store

What do you look for in an ORM? - O'Reilly Answers

What do you look for in an ORM? - O'Reilly Answers

What's Wrong with ORM

What's Wrong with ORM

DBIx::Class - cpan.org

Alexander Hartmaier / DBIx-Class - search.cpan.org

DBIx::Class (aka DBIC) introduction - 2010

DBIx::Class introduction - 2010

Friday, March 25, 2011

GMarks (Add-ons for Firefox) – Google Bookmarks in the sidebar

GMarks :: Add-ons for Firefox

I loved this explore-like display of my Google Bookmarks in the Firebox sidebar. It's not supported any longer for Firefox 4. And Chrome and Chrome don't have a sidebar anyway.

I really loved adding bookmarks that way.

"Continuity of Care Record" (CCR) – ASTM E2369 - 05e1 Standard Specification

ASTM E2369 - 05e1 Standard Specification for Continuity of Care Record (CCR)
Google Health can export your health profile as CCR, an XML dialect.
Today I added another "problem" to my Google Health profile.

Perl ORM comparison (Class::DBI vs. DBIx::Class vs. Rose::DB::Object)

Perl ORM comparison (Class::DBI vs. DBIx::Class vs. Rose::DB::Object)

Perl ORM - DBIx::Class - www.perl.org

Perl ORM - DBIx::Class - www.perl.org

Thursday, March 24, 2011

O'Reilly Media book: Programming the Perl DBI

Programming the Perl DBI

What a pity: not available as ebook at o'Reilly's, but you can find it on the web, just as I did.

Thursday, March 17, 2011

I started using eRuby to create JasperReport JRXML files

All of a sudden I knew, I would immediately need a template mechanism. During the last "Stuttgart.pm" meet-up Mason got mentioned, but I was already a little familiar with eRuby, so I gave it a try, and it was just the right thing to do. The XML file to handle got smaller and smaller and smaller – really, really nice to see.

Update 2011-03-25:
A few days later I am really rather satisfied with this decision.
Of course: eRuby XML files are no longer clean XML, so they are not supported by any editing mode (apart from "text-mode") in emacs, but then that's not too terrible.

Update 2011-04-20:
Of course (again) being able to deal with eRuby XML files as XML files within nxml-mode would be a charm. There are 2 obstacles to overcome:

In order to interpolate ruby expressions into XML this syntax is used:

y="<%=y0+13%>"

but nxml-mode does not accept that for a legal XML attribute value.

Lines starting with '%' are for ruby code, nxml-mode should / may consider them as comments:

% y0 = 97

an extra blank page on PDF-s created by JasperReport has gone

The JRXML, I am creating programmatically, caused the generated PDF to have an extra blank page.

I didn't care a lot, as long as I had not achieved my main goal. Now, that I am going to deliver (OMG!), I tried to smooth that rough edge. As I had not clue, where the problem source really was, I urgently needed to solve that problem today. Spent some time on it, solved it!

My document has only two bands: the Title and the the Background Band.
The Title Band actually doesn't share the page space with any other band. Therefore I thought it may take all the 842 points of height, that the document has itself. That's apparently not true. Apparently the Title Band must be at least be one point smaller the available height. If I respect that rule, I don't have that extra blank page any more.