Saturday, November 17, 2018

APN problem and mobile data

Returning from a trip abroad, my Canadian Public Mobile service stopped providing mobile data.  The problem was that the APN parameters for Public Mobile had been erased. And the "edit" and "add" options for APNs was now disabled.  Only entries for TELUS and Koodoo appeared, and neither were suitable.
I found this solution,
and it worked.

NB: on the phone
  • turn "USB tethering" off
  • enable developer mode (system/aboutphone/7 taps) and switch on USB debugging
  • make sure you use a good USB cable 

Wednesday, October 17, 2018

Counting on base sixteen and four, as seen in the introductions to some early Bengali printed books


Friday, August 31, 2018

Medical e-texts available from the National Institute for Indian Medical Heritage, Hyderabad

It is not easy to find these books at the NIIMH website, so here are the links:
  • Carakasaṃhitā
  • Suśrutasaṃhitā
  • Mādhavanidānam
  • Nighaṇṭavaḥ (including   
    • abhidhānamañjarī 
    • abhidhānaratnamālā 
    • amarakōśa 
    • aṣṭāṅganighaṇṭu 
    • kaiyadēvanighaṇṭu 
    • camatkāranighaṇṭu 
    • dravyaguṇasaṅgraha    
    • dhanvantarinighaṇṭu 
    • nighaṇṭuśēṣa 
    • paryāyaratnamālā 
    • bhāvaprakāśanighaṇṭu 
    • madanapālanighaṇṭu 
    • madanādinighaṇṭu 
    • mādhavadravyaguṇa 
    • rājanighaṇṭu 
    • rājavallabhanighaṇṭu 
    • laghunighaṇṭu 
    • śabdacandrikā 
    • śivakōṣa 
    • sarasvatīnighaṇṭu 
    • siddhamantra 
    • siddhasāranighaṇṭu 
    • sōḍhalanighaṇṭu 
    • sauśrutanighaṇṭu and 
    • hr̥dayadīpakanighaṇṭu)

A melancholy reflection from the online documentation:

...  किन्तु वर्तमान वैज्ञानिक युग में संस्कृत भाषा के प्रति पाठकों की अत्यल्प रुचि के कारण ...
"But in this scientific age there is little inclination towards reading in the Sanskrit language, and therefore ..."

Thursday, August 23, 2018

Fetching multiple files from an internet site as a batch job

Sometimes one encounters a website that displays a book or manuscript page-by-page as individual jpeg files.  But what you need for your research is to have a single PDF of the item, so that you can move about it easily, and consult it offline.

There are several quick ways of getting these images as a batch job: here's one.   

  • First you have to identify the URL of one of the images.  I use Firefox, so I 
    • first bring up a page that displays the first folio of the MS. 
    • Then I press ctrl+I to get the "page info" (or Firefox menu Tools/Page Info).  
    • Then I select "Media" on the top line of the Info window.  
    • Then scroll down to the graphics file of the whole page, right click and ctrl+c to copy the URL.

      You now have a URL that looks like this:

There may be a more direct way of getting this URL, but this is good enough for me.

The next bit is the nice bit.  Drop to the command line and use the utility "curl".  Here's the syntax ($ is my command prompt):

$ curl -O[001-268].jpg
  • Hit "enter" and several hundred jpeg files will be transferred to your directory.  It takes a couple of minutes, depending on your bandwidth.
    The bit in square brackets, "[001-268]" is curl's syntax for "please fetch 001.jpg, 002.jpg, ... 267.jpg, and 268.jpg".  Curl is one of the few tools with this simple ability to fetch lots of different files with a single simple command.

To convert them to a single PDF, I use ImageMagick:

$ convert *.jpg Hayanaratna.pdf
and wait for ten seconds.

(I was taught about curl by Patrick McAllister - thanks Patrick!)

A quite different approach is to use wget to fetch a whole website in a single gulp.   That's what I use for GRETIL, for example, so that I have the whole archive on my hard drive.

Monday, July 09, 2018

Tweaking the Thinkpad's TrackPoint settings in Linux Mint 19

With the update to Linux Mint 19 Cinnamon, the sliders controlling the trackpoint's accelleration and speed on my Thinkpad T560 and T500 don't work any more.  I expect it will get fixed soon.  Meanwhile, as root I  can manually edit the parameters in the filesin the directory
  • /sys/devices/platform/i8042/serio1/serio2
The above directory is found by
  • find /sys/devices/platform/i8042 -name name | xargs grep -Fl TrackPoint | sed 's/\/input\/input[0-9]*\/name$//'
Settings are reset at reboot.  :-(

I like sensitivity 125 and speed 80 on the T560; 190 and 90, inertia 10, on the T500.


I found this solution (X1 parameters) that automates everything and survives reboot :-)

Friday, June 08, 2018

nice historiographical point

From a review of a history book:

"Written more in the tradition of Burckhardt and Braudel than Marx and Hobsbawm, the book is an exercise in seeing rather than storytelling."

Tuesday, May 08, 2018

Photo of Prof. Robert Charles Zaehner

Photos of Prof. Robert Charles Zaehner are rare.  One was published in his obituary in the journal Iran 13 (1975):