Author Archives: Bojan
ezproxy redirect bookmarklet
A while ago I wrote a Google Toolbar button for redirecting the current page to the same page accessed through an EZproxy server. As I was missing this functionality in browsers without Google Toolbar (it’s still not available in Google Chrome), I realized that it’s a very simple thing to do with a bookmarklet. Here [...]
Hello WordPress!
If there is a good thing about having a cold/flu it’s that you get around to do those little things you’ve been putting off for months or years (because you’re not up for much else) — like getting your blog in order. I’ve used Blogger some time ago, then installed WordPress, but never moved old [...]
Posted in Blogging Leave a comment
.bst file for the International Journal of Non-Linear Mechanics
As I was writing my compacton paper, I needed to format my references following the International Journal of Non-Linear Mechanics style. So I wrote a .bst (BibTeX bibliographic style) file that gives pretty much the desired output: ijnlm.bst.
Caffeine triggered migraine
This is an interesting article on caffeine and migraine. I thought the connection was obvious, I had no idea it is something still debated/not explicitly shown in studies.
XML parsing with Perl using XPath
use strict;
use XML::LibXML;
# data source
my $xml_filename = "xml/data.xml";
my $parser = XML::LibXML->new;
my $doc = $parser->parse_file($xml_filename);
my $xpath = "//word/entry[\@src=\"pr\"]/..";
my @words = $doc->findnodes($xpath);
foreach my $word (@words) {
print $word->findvalue("\@id");
print "\n";
}
XSLT transform with Perl
Here is a Perl snippet that transforms an XML file with XSLT:
use strict;
use XML::XSLT::Wrapper;
my $xml_input_filename = "xml/data.xml";
my $xml_output_filename = "xml/out.xml";
my $xsl_filename = "xml/transform.xslt";
my $xslt = XML::XSLT::Wrapper->new(
ProcessorList => [
'libxslt',
'sablotron',
'xslt'
],
);
my $result = $xslt->transform(
OutFile => $xml_output_filename,
xml => $xml_input_filename,
xsl => $xsl_filename,
);
$xslt->dispose();
Blogger, WordPress, b2evolution: Blog Engine Choice
As I signed up with Blogger a few years ago, and have never looked at alternatives, I decided to do so now, just to check whether I'm missing on something. Here's what I found.
Sitemap generator configuration for Blogger
If you are using Google’s sitemap generator [code]]czoxNDpcInNpdGVtYXBfZ2VuLnB5XCI7e1smKiZdfQ==[[/code] to generate a sitemap of your Blogger blog , here are the configuration lines to add to the config.xml file:
Create a symmetric matrix in Mathematica