I'm a student at the Free University of Berlin. I enjoy hacking and messing about with LaTeX.

In case you should whish to contanct me you can do so at carlos@cmartin.tk. To subscribe RSS 2.0 feed

 

The not-so-enhanced for loop

In Java, there’s a loop construct called “enhanced for loop” (it’s just a foreach, don’t get too excited). I decided to use it in the obvious, straightforward way thus: for(String str : words){ str = doSomething(str); } return words; Many will see the problem already. In Java, a variable doesn’t hold your data, everything (except [...]

Tags: , , ,

Filed under:Programming

Not loading a file’s DTD when doing an XSL Transformation in Java

This has hit me in the face two or three times already in the same project, and last time I solved it by calling /usr/bin/xsltproc –html from inside the servlet. Finally I’ve found a way to tell the underlying levels not to bother loading the DTD as it’s useless and doesn’t even live where the [...]

Tags: , , , , ,

Filed under:hacking