Wednesday, July 17, 2013

xml validation, on osx


In OSx, you can rely on the libxml package, which includes xmllint. You will call this on a command line, it's fast and reliable.

A couple of example:

To validate a xml file:

xmllint --noout yourxmlfile.xml

To validate a xml file against a schema:

xmllint --noout --schema yourxsdfile.xsd yourxmlfile.xml


Thursday, May 02, 2013

Kindle - how to remove (easily) items from personal documents

If you, like me, have a lot of "personal documents" in your Amazon library, you know how difficult it can be to remove items from that list.
You have to remove titles one by one, or - if you are fast enough - two or three of them for each try.
Now, this is really annoying.

Enter javascript and bookmarklets...

Below you will find some javascript code that can be used to remove all the items you see on a particular page. In the Amazon Kindle Library page you will have to select "Personal Documents" from the drop down list (otherwise the bookmarklet won't work), and enter a search term in the search textbox, in order to limit the deletion only to the items you really want to delete. This is important, as the javascript will kill ALL the docs you see in the page... ok?

Before you can use the bookmarklet, you'll have to create it. In Chrome this is quite easy:
- right click on the bookmarks bar
- click on "Add Page"
- enter a title for the page name
- paste the javascript code in the "URL" field

That's all: be careful to select only the items you really want to delete, click the bookmarklet you created, and all those documents will go... forever!!!


javascript:(function(){ var v = new RegExp("PersonalDocuments"); if (!v.test(document.URL)) { return false; } {a=document.getElementsByClassName('rowBodyCollapsed');for(var i = 0; i<a.length; i++){Fion.deleteItem('deleteItem_'+a[i].getAttribute('asin'));};return; }})();

Saturday, March 16, 2013

Wordament, and date/time settings

Noticed today, while trying to play Wordament on my brand new Nokia 920 (a white one, if you wonder) that I could not connect to my Xbox Live account.

Tried every obvious hint, no way. Then I noticed that in a FAQ page on the wordament site they refer to the correct date and time setting as a needed requirement.

So... I went to the settings page, disabled the "automatic date and time setting", choose the correct date, time zone, and time, and went back to Wordament.

Now it works without a problem!

Hope this helps, maybe the same issue exists with other Xbox live games...