Thursday 28 July 2011

Bookmarking locations within a web page in Firefox

Sometimes it's handy to bookmark or send someone a precise location within a webpage.  There doesn't appear to be any standard functionality to do this in Firefox.

Of course you could look at the HTML code, find the anchor and concatenate that to the page URL, but that's a bit tedious.

Enter Show Anchors add-on.  Install this and then right-click on the desired page and select 'Show Anchors'.  A little anchor symbol now appears next to each anchor on the page.  Hover over the desired anchor and select 'Bookmark anchor' or 'Send anchor'.

Update Jan 2014: Show Anchors not supported on newer versions of Firefox.  Try Show Anchors 2 instead.

Spring NamespaceHandlers

Spring's XML schema-based configuration is convenient and can reduce developer workload, but often at the expense of a thorough understanding of what is happening under the covers.  The newer custom tags wield a lot of power, so it's worth understanding exactly how they work.

A XML schema definition is held in a .xsd file and can be included in the XML configuration file, see Referencing the schemas.

Each schema has a corresponding NamespaceHandler.  For example, the tx schema, i.e. the <tx:blah> tags are handled by the TxNamespaceHandler.  If you look in TxNamespaceHandler.java you will see that it registers a parser object for each tag in the tx schema.

The remaining piece of magic is the mapping between schema and NamespaceHandler.  This can be found in the spring.handlers file inside the associated jar's META-INF directory.  See Registering the handler and the schema.  In the case of the tx schema this file resides in the META-INF directory in org.springframework.transaction-3.0.x.RELEASE.jar.

Saturday 23 July 2011

Huawei E585, EM770 and Telstra Next G

Telstra has better coverage in rural areas than other mobile operators and this may be a reason for choosing Telstra.

You should note the Telstra 3G network consists of 850MHz coverage ("Next G" network) combined with 2100MHz coverage in certain cities. See Telstra Mobile Networks

It is therefore likely that you want to use the 850MHz coverage. This frequency band is not common, so make sure you have a compatible modem.  See Telstra Network Coverage

Note the Huawei E585 is NOT compatible (only supports 2G in 850MHz band), so if you're out of 2100MHz coverage, you're going to get 2G data at best (and you'll need to select "3G Preferred", rather than "3G Only").

However the Huawei EM770 mini PCI card is compatible and works perfectly, although you will be restricted to7.2Mbps download / 5.76Mbps upload (Telstra claim to support up to 20Mbps download in certain areas).

$2 Telstra SIMs are widely available and can be activated as a mobile broadband SIM by calling 1258887 from a Telstra phone or 132200 from a non-Telstra phone (it appears you cannot activate these online as you can with voice SIMs). See Telstra Pre-Paid Mobile Broadband Getting Started

The following modem settings worked for me:

APNtelstra.internet
Username[blank]
Password[blank]
Number*99#
AuthenticationCHAP

UPDATE 23/12/2011: the more recent Huawei E585u-82 does support 3G in 850MHz band.  It's available as a Vodafone Pocket WiFi 2. Look out for half price deals on these / eBay.  They can be unlocked for 10 Euros using the dc-unlocker software. Once unlocked they work fine on Telstra's 850MHz 3G.