Monday, January 24, 2011
Thursday, January 13, 2011
Wednesday, January 12, 2011
.properties - Java's Property Resource Bundles
.properties - Wikipedia, the free encyclopedia
- For Western Europeans it's quite comfortable to be able to edit .properties files in ISO-8859-1 aka Latin-1.
- The 1st German .properties file, that I came across, was actually written using '\u00HH' for the German umlauts, with HH being the hexadecimal digits of the Latin-1 encoding of the character.
I looked up the Wikipedia article on Unicode, and I learned that this is a perfectly legal encoding of the Latin-1 character set, i.e. the 1st 256 characters of Latin-1 and Unicode (resp. its "BMP") are the same. - ...
Labels:
the Java universe,
Unicode
Wednesday, January 5, 2011
how to burst a PDF document into single pages (etc.)
This command line shows, how to get the output files named your way:
$ pdftk … burst output 'page.%02d.pdf'
Split Select Pages from Multiple PDFs into a New Document:
$ pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
Select a single page into a new document:
Please find more information (like examples, man page, …) on pdftk here!
$ pdftk … burst output 'page.%02d.pdf'
Split Select Pages from Multiple PDFs into a New Document:
$ pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
Select a single page into a new document:
$ pdftk A=one.pdf cat A130 output one.p130.pdf
Please find more information (like examples, man page, …) on pdftk here!
Monday, January 3, 2011
.DS_Store - Wikipedia, the free encyclopedia
.DS_Store - Wikipedia, the free encyclopedia
From www.greci.cc:
By default, MacOS X will create a .DS_Store file in every folder it accesses, while this is ok in OS X it may be annoying for network shares. To prevent the creation of .DS_Store files on network volumes execute this from a Terminal:
From www.greci.cc:
By default, MacOS X will create a .DS_Store file in every folder it accesses, while this is ok in OS X it may be annoying for network shares. To prevent the creation of .DS_Store files on network volumes execute this from a Terminal:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Labels:
Mac OS X
Sunday, January 2, 2011
The SAXON XSLT and XQuery Processor
The SAXON XSLT and XQuery Processor
Downloaded Saxon-HE from the above URL on my Linux box, decided to go for the Java variant, installed saxonhe.jar and "the resources" into /usr/local/saxon-resources9-3.
I wasn't able to browse the documentation below saxon-resources9-3/doc with Chrome-10, so I use Firefox-3.6 for that.
But I also read the documentation here.
This is from "Getting started with Saxon on the Java platform", adapted for my Unix-like platform:
More command lines tries from there:
(to be continued)
Downloaded Saxon-HE from the above URL on my Linux box, decided to go for the Java variant, installed saxonhe.jar and "the resources" into /usr/local/saxon-resources9-3.
I wasn't able to browse the documentation below saxon-resources9-3/doc with Chrome-10, so I use Firefox-3.6 for that.
But I also read the documentation here.
This is from "Getting started with Saxon on the Java platform", adapted for my Unix-like platform:
$ java -cp /usr/local/saxon-resources9-3/saxon9he.jar net.sf.saxon.Query -t '-qs:current-date()'Well, no error messages. I like that. Looks like I got all preconditions fulfilled.
More command lines tries from there:
$ cd /usr/local/saxon-resources9-3
$ java -cp /usr/local/saxon-resources9-3/saxon9he.jar net.sf.saxon.Transform -t -s:samples/data/books.xml -xsl:samples/styles/books.xsl -o:$HOME/temp.html
$ java -cp /usr/local/saxon-resources9-3/saxon9he.jar net.sf.saxon.Query -t -s:samples/data/books.xml -q:samples/query/books-to-html.xq > $HOME/temp.html
(to be continued)
Thursday, December 30, 2010
Moshe Zimmermann - Wikipedia, the free encyclopedia
Moshe Zimmermann - Wikipedia, the free encyclopedia
Being interview on the radio (Deutschlandfunk) Zimmermann (an Israeli historian and publicist) just made a statement on his former student Moshe Katsav, Israel's former, 8th president, who was convicted of rape today.
Being interview on the radio (Deutschlandfunk) Zimmermann (an Israeli historian and publicist) just made a statement on his former student Moshe Katsav, Israel's former, 8th president, who was convicted of rape today.
Labels:
Deutschlandfunk
Tuesday, December 28, 2010
diff XML documents
What's the Diff? Diff XML Documents
I just tried that IBM Java utility on the command line of a Linux system. Not bad.
I only tried it on a rather simple example, where I removed a single element.
Looks like you better run the command twice, with permuted arguments.
I just tried that IBM Java utility on the command line of a Linux system. Not bad.
I only tried it on a rather simple example, where I removed a single element.
Looks like you better run the command twice, with permuted arguments.
Labels:
XML
Monday, December 27, 2010
writing procmail rules querying Return-Path
I prefer writing procmail rules querying Return-Path instead of From.
The Return-Path header field gets faked rather rarely as opposed to the From header field, it's far more often machine generated, that's why I regard it more reliable.
Today I found myself in a situation, where the Return-Path header field looked differently after my usual fetchmail+procmail execution chain. I didn't recognize that from the beginning. I tried hard for a couple of hours matching the "original" Return-Path, but I did not succeed. Only after I recognized the difference and turned my interest towards the "new" Return-Path, I immediately succeeded creating another nice procmail rule for that message resp. for messages from that sender.
I still cannot explain myself, why and how Return-Path gets changed, but now I know and respect it does.
The Return-Path header field gets faked rather rarely as opposed to the From header field, it's far more often machine generated, that's why I regard it more reliable.
Today I found myself in a situation, where the Return-Path header field looked differently after my usual fetchmail+procmail execution chain. I didn't recognize that from the beginning. I tried hard for a couple of hours matching the "original" Return-Path, but I did not succeed. Only after I recognized the difference and turned my interest towards the "new" Return-Path, I immediately succeeded creating another nice procmail rule for that message resp. for messages from that sender.
I still cannot explain myself, why and how Return-Path gets changed, but now I know and respect it does.
Labels:
procmail
Saturday, December 25, 2010
Wednesday, December 22, 2010
Tuesday, December 21, 2010
Tuesday, December 14, 2010
"aligning text in programs is ASCII art"
I love indenting and aligning, I love structuring, be it in tables or in data structures.
The human mind enjoys and rewards structure.
Some people don't understand that and punish others' credo with arrogant disrespect.
I currently associate this kind of intolerant mentality with the Python community. I hope some Python disciples will prove me wrong sooner or later.
The human mind enjoys and rewards structure.
Some people don't understand that and punish others' credo with arrogant disrespect.
I currently associate this kind of intolerant mentality with the Python community. I hope some Python disciples will prove me wrong sooner or later.
Labels:
programmer arrogance
Location:
Eugensplatz, Stuttgart, Germany
Sunday, December 12, 2010
Fuse::PDF – Filesystem embedded in a PDF document
Chris Dolan's Fuse-PDF-0.09 - search.cpan.org
Chris is also the author of the very well known and admired CAM::PDF.
I think it's worth having a very long look at this.
Chris is also the author of the very well known and admired CAM::PDF.
I think it's worth having a very long look at this.
Labels:
CPAN,
PDF,
The Perl Programming Language
Saturday, December 11, 2010
book: Programming Groovy
The Pragmatic Bookshelf | Programming Groovy
From the wikipedia article on Groovy:
Update 2011-07-01:
Purchased it as a used book through Amazon.de.
From the wikipedia article on Groovy:
Most Java code is also syntactically valid Groovy. […]Maybe I better focus on Scala than on Groovy.
In July 2009, Strachan wrote on his blog that "I can honestly say if someone had shown me the Programming in Scala book by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy."[1] Strachan left the project silently long before the Groovy 1.0 release in 2007.
Update 2011-07-01:
Purchased it as a used book through Amazon.de.
book: Programming Clojure
The Pragmatic Bookshelf | Programming Clojure
Lisp on the JVM – maybe a nice idea.
Update 2011-08-07
Found a Clojure User Group Berlin.
Order the book through Amazon as used book, but with Amazon Prime service.
Lisp on the JVM – maybe a nice idea.
Update 2011-08-07
Found a Clojure User Group Berlin.
Order the book through Amazon as used book, but with Amazon Prime service.
Friday, December 10, 2010
CAM::PDF - PDF manipulation library by "Clotho Advanced Media"
CAM::PDF - search.cpan.org
I am currently into PDF "reading", and this software looks rather promising.
There are also a couple of nice command line utilities in the TAR ball's bin/ subdirectory.
That reminded me of that fixin utility from the very old days, which updates the #! ("shebang") line appropriately.
I am currently into PDF "reading", and this software looks rather promising.
There are also a couple of nice command line utilities in the TAR ball's bin/ subdirectory.
- appendpdf.pl
- asciify
- changepagestring.pl
- changepdfstring.pl
- changerefkeys.pl
- crunchjpg_tmpl.pdf
- crunchjpgs.pl
- deillustrate.pl
- deletepdfpage.pl
- extractallimages.pl
- extractjpgs.pl
- fillpdffields.pl
- getpdffontobject.pl
- getpdfpage.pl
- getpdfpageobject.pl
- getpdftext.pl
- listfonts.pl
- listimages.pl
- listpdffields.pl – sic!!! – I adapted that a little, now it shows page num. (with a little extra help from Chris Dolan) and the position for each field
- pdfinfo.pl
- readpdf.pl – shows you the PDF data structure as perl data dump
- renderpdf.pl
- replacepdfobj.pl
- revertpdf.pl
- rewritepdf.pl
- setpdfbackground.pl
- setpdfpage.pl
- stamppdf.pl
- uninlinepdfimages.pl
That reminded me of that fixin utility from the very old days, which updates the #! ("shebang") line appropriately.
Labels:
App::perlbrew,
CPAN,
PDF,
The Perl Programming Language
Location:
Eugensplatz, Stuttgart, Germany
form fields in PDF – how to retrieve their details?
This command line shows you a few details:
$ pdftk … dump_data_fields
Not enough details for me.
What about CAM::PDF?
It comes with a couple of nice sample utilities (the bin/ subdirectory), one of them is called listpdffields.pl . It also does not show me enough details, but I think I will enhance that one.
Update / 2010-12-11:
Yes, CAM::PDF works very well for me. I wrote another article on that.
$ pdftk … dump_data_fields
Not enough details for me.
What about CAM::PDF?
It comes with a couple of nice sample utilities (the bin/ subdirectory), one of them is called listpdffields.pl . It also does not show me enough details, but I think I will enhance that one.
Update / 2010-12-11:
Yes, CAM::PDF works very well for me. I wrote another article on that.
Labels:
CAM::PDF,
PDF,
PDF harvesting,
PDF scraping,
pdftk
Location:
Eugensplatz, Stuttgart, Germany
App::perlbrew : the man page and "perlbrew list"
The man page makes you think, there is a "perlbrew list", and older versions didn't have it. Older versions had a "perlbrew installed" instead. Quite a good reason to upgrade you perlbrew.
Location:
Eugensplatz, Stuttgart, Germany
Thursday, December 9, 2010
editing JRXML in emacs using nxml-mode
Just created an RELAG-NG ("compact") grammar for editing JRXML files.
I used trang for that, and the "input module" was a sample JRXML file. Yes, that means: occasionally some JRXML file will have tags or attributes, that my jasperreport.rnc does not know yet. But then re-running trang on an additional sample file is not really a big job.
I really love editing XML.
I re-ordered and "grouped" the XML pieces for the elements in my sample reports. That helps to clean up some things, that got a little messy over the time. In the end you recognize, how much duplicate code you have.
You may want to fight the redundancy problems through JRXML subreports.
I actually made my JRXML a "here document" for a shell script. A couple of hours later I knew, that a perl script is the better approach. Another couple of hours later there were plenty little parameterized "here documents". I have solved my redundancy problem here through "looping over lists of configurations".
I used trang for that, and the "input module" was a sample JRXML file. Yes, that means: occasionally some JRXML file will have tags or attributes, that my jasperreport.rnc does not know yet. But then re-running trang on an additional sample file is not really a big job.
I really love editing XML.
I re-ordered and "grouped" the XML pieces for the elements in my sample reports. That helps to clean up some things, that got a little messy over the time. In the end you recognize, how much duplicate code you have.
You may want to fight the redundancy problems through JRXML subreports.
I actually made my JRXML a "here document" for a shell script. A couple of hours later I knew, that a perl script is the better approach. Another couple of hours later there were plenty little parameterized "here documents". I have solved my redundancy problem here through "looping over lists of configurations".
Labels:
JasperReports,
JasperSoftForge,
JRXML,
nxml-mode,
relax-ng
Location:
Eugensplatz, Stuttgart, Germany
Wednesday, December 8, 2010
building pdftk-1.44 on opensuse-11.3
I just succeeded building the current pdftk using Makefile.Redhat with no modifications at all.
Precondition: have the GCJ RPM-s and the fastjar RPM installed.
I tried hard to ignore all the warnings regarding the Java source code.
Precondition: have the GCJ RPM-s and the fastjar RPM installed.
I tried hard to ignore all the warnings regarding the Java source code.
Location:
Eugensplatz, Stuttgart, Germany
Wednesday, December 1, 2010
Subscribe to:
Posts (Atom)