tag:blogger.com,1999:blog-22873349624096092242024-03-13T14:20:30.944+13:00Carey HimselfBlogger: showcasing my lack of design skills since 2011.Unknownnoreply@blogger.comBlogger16125tag:blogger.com,1999:blog-2287334962409609224.post-48167402711087469742016-06-02T11:51:00.001+12:002016-06-02T11:51:43.865+12:00<p>Since it doesn’t all seem to be documented in one place, here’s how to install Debian GNU/Linux from a USB key install of a DVD, but using UEFI. This supplements the “<a href="https://www.debian.org/releases/jessie/amd64/ch04s03.html.en#usb-copy-flexible">Manually Copying Files to the USB Stick</a>” section of the manual.</p><p>You will need:</p><ol><li>A FAT-formatted USB flash drive.</li>
<li>An <code>amd64</code> network install ISO image from <a href="https://www.debian.org/CD/netinst/">www.debian.org/CD/netinst/</a>, or a larger CD or DVD installer image if you already have one.</li>
<li>The latest GTK initrd.gz and vmlinuz images from <a href="http://ftp.debian.org/debian/dists/jessie/main/installer-amd64/current/images/hd-media/gtk/">ftp.debian.org</a>.</li>
<li>The latest version of Syslinux from <a href="https://www.kernel.org/pub/linux/utils/boot/syslinux/">www.kernel.org</a>.</li>
</ol>Format the flash drive, then create a new directory <code>efi/boot</code> on it. Copy these files:<br />
<ol><li><code>vmlinuz</code> and <code>initrd.gz</code> into <code>efi/boot</code>.</li>
<li>From Syslinux, <code>efi64/efi/syslinux.efi</code>, renamed and copied to <code>efi/boot/bootx64.efi</code>.</li>
<li>Also from Syslinux, <code>efi64/com32/elflink/ldlinux/ldlinux.e64</code> copied into <code>efi/boot</code> with the same name.</li>
<li>And the ISO image into the root of the flash drive.</li>
</ol><p>Create a new text file <code>efi/boot/syslinux.cfg</code> with these contents:</p><pre>PROMPT 1
TIMEOUT 2
DEFAULT linux
LABEL linux
KERNEL vmlinuz
INITRD initrd.gz
APPEND vga=788</pre><p>No other steps are necessary to make the flash drive bootable. Perhaps after disabling Secure Boot, any recent, reasonably compliant PC will boot directly into the Debian installer.</p>Carey Evanshttp://www.blogger.com/profile/03868392542114468828noreply@blogger.com0tag:blogger.com,1999:blog-2287334962409609224.post-64316200291012789712014-03-04T20:40:00.003+13:002014-03-04T20:47:01.041+13:00Notes on installing node-ffi on Windows<p>Summary: it was a lot more trouble than I expected.</p><p>There are three main things I did to stop <code>npm install ffi</code> from failing after an “MSB8020” error about the v100 Platform Tools not being available:<br />
<ol><li>I <a href="https://github.com/TooTallNate/node-gyp/wiki/Updating-npm%27s-bundled-node-gyp">updated npm’s bundled node-gyp</a>, although I suspect this made no difference.</li>
<li>I repaired my installation of Visual Studio 2013 Express to clean up from my previous attempts to install Visual Studio 2010 at the same time.</li>
<li>I failed to install the wrong Windows 7 SDK, failed to uninstall it, succeeded in uninstalling it, and installed the <a href="http://www.microsoft.com/en-us/download/details.aspx?id=3138">right version of the Windows 7 SDK</a>, as linked from the Mozilla Developer Network documentation about <a href="https://developer.mozilla.org/en-US/docs/Windows_SDK_versions">Windows SDK versions</a>.</li>
</ol>Carey Evanshttp://www.blogger.com/profile/03868392542114468828noreply@blogger.com0tag:blogger.com,1999:blog-2287334962409609224.post-3520384408289384612012-04-10T16:14:00.002+12:002012-04-12T11:17:12.241+12:00NTLM Proxy Authentication with Google Cloud Connect<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzg2lNZg-f7FNo6SBI7uArDBEe7-2ZkoKg_LrNeDEGV5XJn3r72L9Zg4UwRtqHROvAqJdb_3NYJWrCSTJ2XFHkrCrBvhMvuoRgwJzrUoSKAWTbJ-WMEoXvie-nmMsquFEl5SxHhqKHIQ/s1600/cloudconnect.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="140" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzg2lNZg-f7FNo6SBI7uArDBEe7-2ZkoKg_LrNeDEGV5XJn3r72L9Zg4UwRtqHROvAqJdb_3NYJWrCSTJ2XFHkrCrBvhMvuoRgwJzrUoSKAWTbJ-WMEoXvie-nmMsquFEl5SxHhqKHIQ/s200/cloudconnect.png" width="200" /></a></div>
<p><a href="http://tools.google.com/dlpage/cloudconnect" target="_blank">Google Cloud Connect</a> would be useful software at work if it supported our proxy server properly. Unfortunately, it doesnʼt support integrated Windows authentication, and to provide a username and password, you have to specify a proxy server explicitly and it doesnʼt work from home. Hereʼs how to make Cloud Connect automatically detect the proxy server settings while signing in automatically too.</p>
<p>The secret to fixing it is to that Cloud Connect runs on Microsoft .NET and uses the <a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest%28v=vs.80%29.aspx">System.Net</a> HTTP classes to communicate with the Google servers. To configure the proxy, youʼll create an application configuration for Microsoft Excel, PowerPoint and Word, and set the <code>useDefaultCredentials</code> attribute on the <a href="http://msdn.microsoft.com/en-us/library/kd3cf2ex%28v=vs.80%29.aspx"><defaultProxy> element</a>. You could also edit the <code>machine.config</code> file, but this file affects the entire system and can break rather a lot of unrelated applications, so I prefer not to.</p>
<p>First, create a new file called <code>WINWORD.EXE.config</code> using Notepad or <a href="http://notepad-plus-plus.org/">your favorite alternative</a>, and copy and paste the following text into it:</p>
<pre>
<configuration>
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy usesystemdefault="true"/>
</defaultProxy>
</system.net>
</configuration>
</pre>
<p>Make sure the file is <em>not</em> accidentally called <code>WINWORD.EXE.config.txt</code> by <a href="http://support.microsoft.com/kb/865219">showing file extensions</a> in Windows Explorer.</p>
<p>To use this configuration, copy it into the same directory as <code>WINWORD.EXE</code>. For 32-bit Office 2010 with the default installation path on a 64-bit system, this will be <code>C:\Program Files (x86)\Microsoft Office\Office14\</code>. Then rename the original file to <code>EXCEL.EXE.config</code> and copy it to the same directory, and finally do the same using <code>POWERPNT.EXE.config</code> as the file name.</p>
<p>You should now be able to restart Microsoft Office, and edit files on Google Docs without putting your username and password into the Cloud Connect proxy configuration.</p>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-2287334962409609224.post-74205787901800901812012-01-02T15:12:00.000+13:002012-04-02T13:56:13.503+12:00Recipe: Burger Patties<div itemscope itemtype="http://schema.org/Recipe">
<meta itemprop=name content="Burger Patties">
<p style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3TZw8D3q-JjsmVKNbLxF2paN_lwawSp_-eRdpwQV_uFRR12tNvMqd3umXrlP2DYO6HTJ-uGgAwxEgp8VMDXKPBNtLvxj6kV8LoStnZMd-ixP-qfIQ7eOrzgVgkV0U2-iwbWX5IqQYdw/s1600/IMAG0234.jpg"><img height=181 width=320 itemprop=image src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3TZw8D3q-JjsmVKNbLxF2paN_lwawSp_-eRdpwQV_uFRR12tNvMqd3umXrlP2DYO6HTJ-uGgAwxEgp8VMDXKPBNtLvxj6kV8LoStnZMd-ixP-qfIQ7eOrzgVgkV0U2-iwbWX5IqQYdw/s320/IMAG0234.jpg"></a></p>
<p itemprop=description>Low carb, gluten free hamburger patties for our whole family.<p>
<p>You will need:</p>
<ul>
<li itemprop=ingredients>400g cheap minced beef</li>
<li itemprop=ingredients>3 cloves of garlic, crushed</li>
<li itemprop=ingredients>½ teaspoon mustard powder</li>
<li itemprop=ingredients>¼ teaspoon ground black pepper</li>
<li itemprop=ingredients>a pinch of paprika</li>
<li itemprop=ingredients>1 small egg</li>
</ul>
<div itemprop=recipeInstructions>
<p>Combine all ingredients and mix well with your hands. Separate the mixture into balls about 5 cm across, or about 60 g.</p>
<p>To cook, flatten the balls to less than 1 cm, and cook with a little dripping on a frying pan or barbecue until done, turning once when the bottom is brown.</p>
<p>Uncooked patties can be frozen with baking paper between them.</p>
</div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2287334962409609224.post-63632657654924300412011-10-29T15:42:00.000+13:002013-01-01T23:05:28.645+13:00Recipe: Lamb Rogan Josh<div itemscope itemtype="http://schema.org/Recipe">
<meta itemprop=name content="Lamb Rogan Josh">
<p itemprop=description>This recipe is based on the excellent <a href="http://www.route79.com/food/rogan-josh.htm">Route 79 Rogan Josh recipe</a>, updated to ensure it contains absolutely no chilli or wheat products, so my wife and kids can eat it. It’s one of the kids’ favorite meals, and the only way Trina will eat lamb.</p>
<p>This recipe makes far too much, so we freeze the extra for another few kids’ meals when they’re tired and we don’t have time to cook.</p>
<p>You will need:</p>
<ul>
<li itemprop=ingredients>About 700g of lamb.</li>
<li itemprop=ingredients>A thumb-sized chunk of ginger.</li>
<li itemprop=ingredients>Two or three cloves of garlic.</li>
<li itemprop=ingredients>2 teaspoons salt.</li>
<li itemprop=ingredients>1 teaspoon turmeric.</li>
<li itemprop=ingredients>4 teaspoons whole coriander seed.</li>
<li itemprop=ingredients>3 teaspoons whole cumin seed.</li>
<li itemprop=ingredients>3 cardamom pods.</li>
<li itemprop=ingredients>¼ teaspoon ground cinnamon.</li>
<li itemprop=ingredients>3 cloves.</li>
<li itemprop=ingredients>¼ teaspoon peppercorns.</li>
<li itemprop=ingredients>A pinch of ground nutmeg.</li>
<li itemprop=ingredients>One star anise.</li>
<li itemprop=ingredients>One bay leaf.</li>
<li itemprop=ingredients>Chilli powder to taste.</li>
<li itemprop=ingredients>One large onion.</li>
<li itemprop=ingredients>A sploosh of oil. </li>
<li itemprop=ingredients>Two 400g tins of chopped tomatoes.</li>
<li itemprop=ingredients>A cup or so of coriander leaves (cilantro).</li>
<li itemprop=ingredients>A large pot, and a couple of hours until dinner</li>
<li itemprop=ingredients>A cup or so of basmati rice.</li>
</ul>
<div itemprop=recipeInstructions>
<p>Remove the lamb from the bone, and chop it into bite size pieces, removing the worst of the fat. Roughly peel then grate the ginger with a Microplane or similar, peel and crush the garlic, and grind the coriander seed, cumin seed and pepper in an electric grinder.</p>
<p>Sploosh some oil into the pot, and chop the onion while it is heating. Fry the onion with the garlic and ginger until it goes soft, then add the salt and all the ground spices and keep frying. Some of the spices may stick to the pot, but keep stirring to make sure they don’t burn.</p>
<p>After a few minutes, add the lamb, the bay leaf and the rest of the spices. (Keep the coriander leaves for later.) Keep stirring while browning the lamb. As the fat cooks off the lamb you should be able to start scraping off any spices that were stuck to the bottom of the pot.</p>
<p>Once the lamb is browned and coated with the spices, add the tins of tomatoes. Put the lid on the pot and bring it to the boil, then turn it right down. Put the rice in lots of water to soak.</p>
<p>Let the pot simmer quietly for half an hour, then give it a stir. After another half an hour, chop the coriander leaves and stir them in, then keep cooking, stirring regularly to make sure it doesn’t catch. Drain and rinse the rice, and start cooking it however you prefer.</p>
<p>When the rice is done, serve it with the lamb on top, and put any leftover lamb in the freezer for later. Try not to serve the bay leaf or the star anise to the kids. Enjoy!</p>
</div>
</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2287334962409609224.post-80080851557732114922006-01-26T19:55:00.001+13:002011-10-24T14:02:04.429+13:00Greasemonkey User Scripts for Firefox<p>Greasemonkey is an extension for the
<a href="http://www.mozilla.com/firefox/">Firefox web browser</a> that lets users run their
own <a href="http://developer.mozilla.org/en/docs/JavaScript">JavaScript</a> programs on
any or all web pages they visit. I've written a few Greasemonkey scripts, two of which are
<a href="#user-scripts">listed below</a>.</p>
<p>For more information about Greasemonkey, see one of the following links:</p>
<ul>
<li><a href="http://www.greasespot.net/">Greasemonkey development</a> at Greasespot.</li>
<li><a href="http://web.archive.org/web/20110726001221/http://diveintogreasemonkey.org/">Dive Into Greasemonkey</a> online book by Mark Pilgrim.</li>
<li><a href="http://en.wikipedia.org/wiki/Greasemonkey">Greasemonkey article</a> on <a href="http://en.wikipedia.org/">Wikipedia</a>.</li>
<li><a href="http://userscripts.org/">userscripts.org</a> Greasemonkey scripts repository.</li>
</ul>
<h4 id="user-scripts">User Scripts</h4>
<p>After installing Greasemonkey, click the user script name below to view and install the script.</p>
<dl>
<dt><a href="http://carey.geek.nz/code/userscripts/ibm-infocenter-cleanup.user.js">IBM Infocenter Cleanup</a></dt>
<dd>Makes the <a href="http://publib.boulder.ibm.com/eserver/">IBM Information Centers</a>
easier to use by removing the large header, and making sure the navigation and content
have white backgrounds.</dd>
<dt><a href="http://carey.geek.nz/code/userscripts/gc-gmaps-travel-bug.user.js">Geocaching Google Maps Travel Bug</a></dt>
<dd>Adds a link to the Trackable Item Options on
<a href="http://www.geocaching.com/">geocaching.com</a> to open travel bugs tracks
in Google Maps, as well as Google Earth. See
<a href="http://www.geocaching.com/track/details.aspx?guid=0e20ec3f-9966-4194-a861-98c76b4a1f86">Pop’s Green Jeep Racers Geocoin</a>
for an example.</dd>
</dl>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-43548368681549724192004-10-05T00:25:00.000+13:002011-10-24T10:54:36.721+13:00Wikipedia Search Plugins for Firefox and IE 7+<p>This is a collection of search plugins for
<a href="http://www.wikipedia.org/">Wikipedia</a> for a selection of languages.
Other versions of some of them are available from from
<a href="http://mycroft.mozdev.org/quick/wikipedia.html">Mycroft</a>.</p>
<p>These days, you’re best to install the search plugins directly from Wikipedia.</p>
<p>Select a site from the list below to install the search plugin.</p>
<a name='more'></a>
<ul id="plugins">
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-af.xml">Wikipedia – Afrikaans (Afrikaans Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-als.xml">Wikipedia – Alemannisch (Alemannic Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-an.xml">Biquipedia – Aragonése (Aragonese Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ar.xml">ويكيبيديا – العربية (Arabic Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ast.xml">Uiquipedia – Asturien (Asturian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-az.xml">Wikipedia – Azərbaycan (Azerbaijani Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-be.xml">Вікіпэдыя – Беларускі (Belarusian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-bg.xml">Уикипедия – Български (Bulgarian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-bn.xml">উইকিপিডিয়া – বাংলা (Bengali Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-br.xml">Wikipedia – Brezhoneg (Breton Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-bs.xml">Wikipedia – Bosanski (Bosnian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ca.xml">Viquipèdia – Català (Catalan Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ceb.xml">Wikipedya – Sinugboanong Binisaya (Cebuano Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-co.xml">Wikipedia – Corsu (Corsican Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-cs.xml">Wikipedie – Čeština (Czech Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-cv.xml">Википеди – Чӑваш (Chuvash Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-cy.xml">Wicipedia – Cymraeg (Welsh Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-da.xml">Wikipedia – Dansk (Danish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-de.xml">Wikipedia – Deutsch (German Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-el.xml">Βικιπαιδεια – Ελληνικά (Greek Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-en.xml">Wikipedia – English (English Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-eo.xml">Vikipedio – Esperanto (Esperanto Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-es.xml">Wikipedia – Español (Spanish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-et.xml">Vikipeedia – Eesti (Estonian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-eu.xml">Wikipedia – Euskara (Basque Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-fa.xml">ویکیپدی – فارسی (Persian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-fi.xml">Wikipedia – Suomi (Finnish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-fo.xml">Wikipedia – Føroyskt (Faroese Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-fr.xml">Wikipédia – Français (French Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-fy.xml">Wikipedy – Frysk (West Frisian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ga.xml">Vicipéid – Gaeilge (Irish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-gd.xml">Wikipedia – Gàidhlig (Scottish Gaelic Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-gl.xml">Wikipedia – Galego (Galician Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-gu.xml">વિકિપીડિયા – ગુજરાતી (Gujariti Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-he.xml">ויקיפדיה – עברית (Hebrew Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-hi.xml">विकिपीडिया – हिंदी (Hindi Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-hr.xml">Wikipedija – Hrvatski (Croatian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ht.xml">Wikipedia – Kreyòl ayisyen (Haitian Creole Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-hu.xml">Wikipédia – Magyar (Hungarian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ia.xml">Wikipedia – Interlingua (Interlingua Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-id.xml">Wikipedia – Indonesian (Indonesian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ilo.xml">Wikipedia – Ilokano (Ilokano Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-io.xml">Wikipedio – Ido (Ido Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-is.xml">Wikipedia – Íslenska (Icelandic Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-it.xml">Wikipedia – Italiano (Italian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ja.xml">ウィキペディア – 日本語 (Japanese Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-jbo.xml">uikipedias – lojban (Lojban Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-jv.xml">Wikipedia – Basa Jawi (Javanese Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ka.xml">ვიკიპედია – ქართული (Georgian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-kn.xml">ವಿಕಿಪೀಡಿಯ – ಕನ್ನಡ (Kannada Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ko.xml">위키백과 – 한국어 (Korean Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ku.xml">Wîkîpediya – Kurdî (Kurdish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-kw.xml">Wîkîpediya – Kernewek (Cornish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-la.xml">Vicipædia – Latine (Latin Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-lb.xml">Wikipedia – Lëtzebuergesch (Luxembourgish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-li.xml">Wikipedia – Limburgs (Limburgish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-lt.xml">Wikipedija – Lietuvių (Lithuanian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-lv.xml">Wikipēdija – Latviešu (Latvian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-mi.xml">Wikipedia – Māori (Maori Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-mk.xml">Википедија – Македонски (Macedonian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ml.xml">വിക്കിപീഡിയ – മലയാളം (Malayalam Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-mr.xml">विकिपीडिया – मराठी (Marathi Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ms.xml">Wikipedia – Bahasa Melayu (Malay Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-nap.xml">Wikipedia – Nnapulitano (Neapolitan Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-nds.xml">Wikipedia – Platdüütsch (Low Saxon Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-nl.xml">Wikipedia – Nederlands (Dutch Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-nn.xml">Wikipedia – Nynorsk (Norwegian (Nynorsk) Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-no.xml">Wikipedia – Bokmål (Norwegian (Bokmaal) Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-oc.xml">Oiquipedià – Occitan (Occitan Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-os.xml">Википеди – Иронау (Ossetic Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-pl.xml">Wikipedii – Polski (Polish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-pt.xml">Wikipédia – Português (Portuguese Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ro.xml">Wikipedia – Română (Romanian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ru.xml">Википедия – Русский (Russian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-sa.xml">Wikipedia – संस्कृत (Sanskrit Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-scn.xml">Wikipedia – Sicilianu (Sicilian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-sco.xml">Wikipedia – Scots (Scots Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-sh.xml">Wikipedija – Srpskohrvatski (Serbo-Croatian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-simple.xml">Wikipedia – Simple English (Simple English Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-sk.xml">Wikipédia – Slovenský (Slovak Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-sl.xml">Wikipedija – Slovenščina (Slovenian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-sq.xml">Wikipedia – Shqipe (Albanian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-sr.xml">Википедија – Српски (Serbian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-su.xml">Wikipédia – Basa Sunda (Sundanese Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-sv.xml">Wikipedia – Svenska (Swedish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-ta.xml">விக்கிபீடியா – தமிழ் (Tamil Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-te.xml">వికీపీడియా – తెలుగు (Telegu Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-th.xml">วิกิพีเดีย – ไทย (Thai Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-tl.xml">Wikipedia – Tagalog (Tagalog Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-tr.xml">Vikipedi – Türkçe (Turkish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-tt.xml">Wikipediä – Tatarça (Tatar Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-uk.xml">Вiкiпедiя – Українська (Ukrainian Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-vi.xml">Wikipedia – Tiếng Việt (Vietnamese Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-wa.xml">Wikipedia – Walon (Walloon Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-war.xml">Wikipedia – Winaray (Waray-Waray Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-yi.xml">װיקיפּעדיע – ייִדיש (Yiddish Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-zh-min-nan.xml">Wikipedia – Bân-lâm-gú (Min Nan Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikipedia-zh.xml">維基百科 – 中文 (Chinese Wikipedia)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikiquote-bg.xml">Уикицитат – Български (Bulgarian Wikiquote)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikiquote-de.xml">Wikiquote – Deutsch (German Wikiquote)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikiquote-en.xml">Wikiquote – English (English Wikiquote)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikiquote-it.xml">Wikiquote – Italiano (Italian Wikiquote)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikiquote-pl.xml">Wikicytaty – Polski (Polish Wikiquote)</a></li>
<li><a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins/wikiquote-pt.xml">Wikiquote – Português (Portuguese Wikiquote)</a></li>
</ul>
<p>You can also download the <a href="http://carey.geek.nz/code/wikipedia-searchplugin/wikipedia-searchplugin.ods">plugin generator</a>
or a ZIP file containing <a href="http://carey.geek.nz/code/wikipedia-searchplugin/plugins.zip">all the plugins</a>, or
<a href="http://spreadsheets.google.com/pub?key=parRiCIrf7XmRT8MOBwsERw">view the spreadsheet</a>
describing the plugins.</p>
<p>These plugins are released to the public domain.</p>
<h4>Changes</h4>
<dl>
<dt>2006-05-10: Version 1.6.2</dt>
<dd><ul>
<li>Remove “go” parameter since Wikipedia now defaults to title search.</li>
<li>Fix plugins generated for Mycroft.</li>
</ul></dd>
<dt>2006-05-06: Version 1.6.1</dt>
<dd><ul><li>Fix some character encoding problems.</li></ul></dd>
<dt>2006-04-29: Version 1.6</dt>
<dd><ul>
<li>Generate the plugins from an OpenDocument Spreadsheet using OpenOffice.org Basic.
This means that we get a lot more plugins, <a href="http://opensearch.a9.com/">OpenSearch</a>
support for Firefox 2 and Internet Explorer 7, but worse support for several Mac OS 9
character encodings in Sherlock files for Firefox 1.0 and 1.5.</li>
</ul></dd>
<dt>2006-01-18: Version 1.5</dt>
<dd><ul>
<li>New icon from David Fockens.</li>
<li>Fix result item matching.</li>
<li>Switch to title lookup rather than full-text search by default, after Steve Cooney
pointed out the new behaviour when there is no match.</li>
</ul></dd>
<dt>2005-11-13: Version 1.4.4</dt>
<dd><ul>
<li>Add Faroese Wikipedia from Poul J. Clementsen.</li>
<li>Use correct update URL for Mycroft versions.</li>
</ul></dd>
<dt>2005-07-30: Version 1.4.3</dt>
<dd><ul><li>Fix language code for Hungarian Wikipedia.</li></ul></dd>
<dt>2005-07-27: Version 1.4.2</dt>
<dd><ul><li>Use English and US-ASCII for Mycroft versions.</li></ul></dd>
<dt>2005-07-24: Version 1.4.1</dt>
<dd><ul>
<li>Use UTF-8 encoding for Danish, Dutch and Swedish Wikipedias.</li>
<li>Add remaining Wikipedias with over 10 000 articles:
Estonian, Hungarian, Indonesian, Slovak and Serbian.</li>
</ul></dd>
<dt>2005-07-02: Version 1.4</dt>
<dd><ul><li>Interpret results correctly in Mozilla with current version of MediaWiki software.</li></ul></dd>
<dt>2005-07-02: Version 1.3.1</dt>
<dd><ul><li>Changed English Wikipedia search plugin to use UTF-8 encoding.</li></ul></dd>
<dt>2005-03-03: Version 1.3</dt>
<dd><ul><li>Use correct values for <a href="http://philringnalda.com/blog/2005/01/proper_charset_encoding_in_mozilla_firefox_toolbar_search_sherlock_src_files.php">character sets and encodings</a>.</li></ul></dd>
<dt>2005-01-19: Version 1.2.1</dt>
<dd><ul><li>Add Slovene Wikipedia search plugin from Jernej Kovacic.</li></ul></dd>
<dt>2005-01-08: Version 1.2</dt>
<dd><ul>
<li>Updated location of additional result pages.</li>
<li>Added parameter to use full text search.</li>
<li>Added all languages with more than 10000 articles.</li>
</ul></dd>
</dl>
<script>
function install(link) {
if (typeof(window.external) !== 'undefined' && typeof(window.external.AddSearchProvider) !== 'undefined') {
window.external.AddSearchProvider(link.href);
return false;
} else if (window.sidebar && window.sidebar.addSearchEngine) {
window.sidebar.addSearchEngine(
link.href.replace(/xml$/, 'src'),
link.href.replace(/xml$/, 'png'),
link.firstChild.nodeValue,
'Reference');
return false;
} else {
return confirm("The plugin couldn't be installed automatically. Display it instead?");
}
}
(function () {
var a = document.getElementById("plugins").getElementsByTagName("a"), i;
function r(el) { el.onclick = function () { return install(el); }; };
for (i = 0; i < a.length; i++) { r(a[i]); }
})();
</script>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-16138746204719723302004-06-22T20:00:00.000+12:002011-10-23T14:55:55.623+13:00Nokia M11 Interface Address via SNMP<p>I used to use a Nokia M11 to connect to the Internet. The M11 acts
as a router, so the IP address of the router on the Internet bore no
resemblance to the IP address of my computer. However, I needed that
external address to send to <a href="http://www.dyndns.org/">DynDNS.org</a>.</p>
<p>The M11 supports SNMP, so I wrote a short shell script using
<a href="http://www.net-snmp.org/">NET-SNMP</a>. It finds the
external IP address in two steps:</p>
<ol>
<li><p>Loop through the network interface descriptions under
<a href="http://www.alvestrand.no/objectid/1.3.6.1.2.1.2.2.1.2.html"><var>ifDescr</var></a>
to find the
<a href="http://www.alvestrand.no/objectid/1.3.6.1.2.1.2.2.1.1.html"><var>ifIndex</var></a>
of the PPP interface.</p></li>
<li><p>Loop through the IP addresses under <var>ipAdEntIfIndex</var> to
find the matching index, and get the IP address of the selected interface
from <var>ipAdEntAddr</var>.</p></li>
</ol>
<p>The command line syntax has probably changed since I used this program,
so you might need to make some minor changes.</p>
<ul>
<li><a href="http://carey.geek.nz/code/m11addr/m11addr.sh">m11addr.sh</a> (2K)</li>
</ul>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-49504350602798872782004-05-07T19:35:00.000+12:002011-10-26T13:03:30.406+13:00Interesting Links<h4>Computers and the World Wide Web</h4>
<ul>
<li><a href="http://www.mnot.net/cache_docs/">Caching Tutorial for Web Authors and Webmasters</a> by Mark Nottingham</li>
<li><a href="http://www.htmlhelp.com/">HTML Help</a> by the Web Design Group</li>
<li><a href="http://www.icra.org/">Internet Content Rating Association</a></li>
<li><a href="http://archive.ict.govt.nz/plone/archive/standards/web-standards/web-guidelines-v-2-1/chapter6.html">NZ Government Web Guidelines 2.1</a></li>
<li><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
</ul>
<h4>Language and Literature</h4>
<ul>
<li><a href="http://www.hackcraft.net/SunTzu/">The Art of War</a> by Sun Tzu</li>
<li><a href="http://www.boop.org/jan/justso/cat.htm">The Cat that Walked by Himself</a> by Rudyard Kipling</li>
<li><a href="http://www.guardian.co.uk/styleguide">Guardian Style Guide</a></li>
<li><a href="http://www.cherryh.com/www/latin1.htm">Latin 1: The Easy Way</a> by C.J. Cherryh</li>
<li><a href="http://tlt.its.psu.edu/suggestions/international/bylanguage/ipachart.html">Unicode Entity Codes for Phonetic Symbols</a></li>
</ul>
<h4>Mathematics and Science</h4>
<ul>
<li><a href="http://metamath.org/">Metamath</a> by Norm Megill</li>
<li><a href="http://pi.lacim.uqam.ca/eng/">Plouffe’s Inverter</a> by Simon Plouffe</li>
</ul>
<h4>Shopping</h4>
<ul>
<li><a href="http://www.kleinbottle.com/">Acme Klein Bottle</a> by Cliff Stoll</li>
<li><a href="http://www.thinkgeek.com/">ThinkGeek</a></li>
</ul>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-79157033661079217172004-02-20T20:24:00.000+13:002011-10-24T10:38:23.417+13:00Python fcrypt<p>I’ve written a pure Python implementation of the <a
href="http://www.opengroup.org/onlinepubs/7908799/xsh/crypt.html">Unix
crypt(3)</a> algorithm, and packaged it with <a
href="http://www.python.org/community/sigs/current/distutils-sig/">Distutils</a>
and with doc strings for <a href="http://pydoc.org/">pydoc</a>
and <a href="http://www.python.org/doc/current/lib/module-doctest.html">doctest</a>.
It’s based on Eric A. Young’s optimised fcrypt code, which was
written in C.</p>
<p>Download the most recent version:</p>
<ul>
<li><a href="http://carey.geek.nz/code/python-fcrypt/fcrypt-1.3.1.tar.gz">fcrypt-1.3.1.tar.gz</a> (11K)</li>
</ul>
<p>There are some known problems with this software:</p>
<ul>
<li><p>The bitwise arithmetic relies on the specific behaviour of Python
2.2 and earlier when overflowing an integer on 32-bit
architectures. Python 2.3 works the same but generates a very
large number of warnings. Python 2.4 converts many of the
intermediate results from the <tt>int</tt> to the
<tt>long</tt> type, which still works, but is a bit slower.</p>
<p>Since I don’t really understand how the original algorithm and C code works,
fixing this is quite difficult for me.</p></li>
<li><p>If you try to use MD5-crypted passwords which use a salt
beginning with <tt>$1$</tt>, the current version uses
<tt>$1</tt> as the salt, and the DES crypt algorithm.</p></li>
</ul>
<p>In view of the preceding points, and the low security provided by
the DES-based password hashing algorithm, I recommend that you use
Michal Wallace’s <a
href="http://www.sabren.net/code/python/crypt/md5crypt.py">md5crypt</a>
unless you really need compatibility with other software using the
same algorithm. In a future version, I may try to provide
MD5-based hashing in addition to the current algorithm.</p>
<p>If you’re still on Python 2.3 and you’d like to just get rid of the
warnings, you have two options. You could add a command line option
when you start Python:</p>
<pre> python2.3 -Wignore::FutureWarning:fcrypt ...</pre>
<p>Or you could include extra code before importing the module:</p>
<pre style="overflow-x:auto"> import warnings
warnings.filterwarnings('ignore', '', FutureWarning, 'fcrypt$', 0)</pre>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-24866634635062541912004-01-19T15:33:00.000+13:002011-10-23T15:34:43.821+13:00CD-ROM Access in Python<p>Quite some time ago I had the idea of writing a
<a href="http://www.python.org/">Python</a> program to access the
<a href="http://www.freedb.org/">CDDB</a>.
This didn’t get very far, but the code samples I came up with might be
useful to someone else.</p>
<p>If you’re looking for other software like this,
Ben Gertzfield has his own
<a href="http://cddb-py.sourceforge.net/">CDDB modules for
Python</a>.</p>
<p>There are three files for download here:</p>
<ul>
<li><a href="http://carey.geek.nz/code/python-cdrom/cddbid.py">cddbid.py</a> is a small module to
calculate the CDDB ID for a CD-ROM, given the track lengths.</li>
<li><a href="http://carey.geek.nz/code/python-cdrom/cdtoc.py">cdtoc.py</a> is some example code that uses
the ioctl functions in Python to retrieve the track lengths from a
CD-ROM, at least under x86 Linux.</li>
<li><a href="http://carey.geek.nz/code/python-cdrom/CDROM.py">CDROM.py</a> is an automatically generated
file from the Linux cdrom.h header, that provides constants needed by
cdtoc.py.</li>
</ul>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-92106439050567229542003-08-01T12:00:00.000+12:002011-10-25T07:43:03.410+13:00XSLT, CDATA and disable-output-escaping<p>This document elaborates on my ideas about XSLT in response to
Kevin Davis’s
<a href="http://web.archive.org/web/20070704012627/http://alazanto.org/weblog/mt_carbon/a_small_demonstration.php">experiments
with Movable Type</a> at <a href="http://alazanto.org/">Alazanto</a>.</p>
<p>Be warned that really understanding this document will require a
good knowledge of XML and XSLT, although I have tried to make the
explanation and examples as clear as possible.</p>
<h2>The Problem</h2>
<p>Kevin has been experimenting with using XSLT to format simple XML
output from Movable Type into a complete web page. Originally, he
included the data for each weblog entry in a CDATA section containing
literal XHTML, in much the same way as many RSS feeds. See the
following example, reformatted for clarity:</p>
<pre style="border: solid 1x #333; background: #ccc; overflow-x: scroll;"><code><entry>
<title>entry with images</title>
<date>August 09, 2003</date>
<author>Kevin</author>
<idnum>000033</idnum>
<permalink>http://alazanto.org/xml/archives/000033.xml</permalink>
<body xmlns:html="http://www.w3.org/1999/xhtml"><![CDATA[<p><img
class="archive" align="right" src="http://alazanto.org/images/sample.jpg"
alt="photograph of a flower, just for show"/>Mauris felis elit, varius
quis, pulvinar vel, sodales vehicula, mi. Nunc elementum pharetra elit.
</p>]]>
</body>
<more xmlns:html="http://www.w3.org/1999/xhtml"><![CDATA[]]></more>
<comment-link>http://alazanto.org/xml/archives/000033_comments.xml</comment-link>
<comment-count>6</comment-count>
</entry></code></pre>
<p>The XML CDATA markup indicates that the data between
<code><![CDATA[</code> and <code>]]></code> should not be
interpreted as XML with elements and entity references resolved.
Instead, the data is included as a literal string, <em>exactly</em> as
if each <code><</code>, <code>></code> and <code>&</code>
had been encoded as <code>&lt;</code>, <code>&gt;</code> and
<code>&amp;</code> respectively. The result is a DOM tree like
the following:</p>
<ul style="border: solid 1x #333; background: #ccc;">
<li><code><entry></code><ul>
<li><code><title></code><ul>
<li><code>'entry with images'</code></li>
</ul></li>
<li><code><date></code><ul>
<li><code>'August 09, 2003'</code></li>
</ul></li>
<li><code><author></code><ul>
<li><code>'Kevin'</code></li>
</ul></li>
<li><code><idnum></code><ul>
<li><code>'000033'</code></li>
</ul></li>
<li><code><permalink></code><ul>
<li><code>'http://alazanto.org/xml/archives/000033.xml'</code></li>
</ul></li>
<li><code><body></code><ul>
<li><code>'<p><img class="archive" align="right"
src="http://alazanto.org/images/sample.jpg" alt="photograph of a
flower, just for show"/>Mauris felis elit, varius quis, pulvinar
vel, sodales vehicula, mi. Nunc elementum pharetra elit.</p>'
</code></li>
</ul></li>
<li><code><more></code></li>
<li><code><comment-link></code><ul>
<li><code>'http://alazanto.org/xml/archives/000033_comments.xml'</code></li>
</ul></li>
<li><code><comment-count></code><ul>
<li><code>'6'</code></li>
</ul></li>
</ul></li>
</ul>
<p>Note that in this DOM, the child text node of the
<code><body></code> element is <em>just a string,</em> with
no special meaning to an XML parser or an XSLT processor, even if it
looks to you like a paragraph from an XHTML document.</p>
<p>We can write fairly simple XSLT templates to turn this XML into
XHTML for the browser. To include the literal XHTML in the result, we
can try the
<a href="http://www.w3.org/TR/xslt#disable-output-escaping">XSLT
<code>disable-output-escaping</code></a> attribute, with a template
something like this:</p>
<pre style="border: solid 1x #333; background: #ccc; overflow-x: scroll;"><code><xsl:template match="entry">
<div class="entry">
<h2><xsl:value-of select="title"/></h2>
<xsl:value-of select="body" disable-output-escaping="yes"/>
</div>
</xsl:template></code></pre>
<p>Without the <code>disable-output-escaping</code> attribute, the
string value of the <code><body></code> element would be written
to the output so that it could be read in again by another XML parser.
In other words, each <code><</code> would be escaped as
<code>&lt;</code>, each <code>&</code> as
<code>&amp;</code>, and each <code>></code> as
<code>&gt;</code>.</p>
<p>When processed in Internet Explorer, or a stand-alone XSLT
processor, the <code>disable-output-escaping</code> attribute disables
this escaping step, so that the text child of the
<code><body></code> node is included literally in the output
file as shown below, which is what Kevin expected:</p>
<pre style="border: solid 1x #333; background: #ccc; overflow-x: scroll;"><code><div class="entry">
<h2>entry with images</h2>
<p><img class="archive" align="right"
src="http://alazanto.org/images/sample.jpg"
alt="photograph of a flower, just for show"/>Mauris felis elit,
varius quis, pulvinar vel, sodales vehicula, mi. Nunc elementum
pharetra elit... </p>
</div></code></pre>
<p>The problem occurs when trying to use the same templates in
Mozilla. The Mozilla XSLT processor doesn’t support
<code>disable-output-escaping</code>, since it transforms directly
from the source DOM to a destination DOM tree, without an output step
in which to disable escaping. The DOM that Mozilla constructs is
quite predictable, but not what Kevin wanted:</p>
<ul style="border: solid 1x #333; background: #ccc;">
<li><code><div></code><ul>
<li><code>@class='entry'</code></li>
<li><code><h2></code><ul>
<li><code>'entry with images'</code></li>
</ul></li>
<li><code>'<p><img class="archive" align="right"
src="http://alazanto.org/images/sample.jpg"
alt="photograph of a flower, just for show"/>Mauris felis elit,
varius quis, pulvinar vel, sodales vehicula, mi. Nunc elementum
pharetra elit... </p>'</code></li>
</ul></li>
</ul>
<p>This means that Mozilla displays the markup to the
user, complete with <samp><p></samp> and
<samp><img></samp> tags, instead of the paragraph text with a
floating image. <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=98168"
title="<xsl:text disable-output-escaping="yes"< not
working">Mozilla bug 98168</a> is about this behaviour, and
<a href="http://bugzilla.mozilla.org/show_bug.cgi?id=98168#c11">comment
11</a> states quite clearly that it is expected and will not be changed.</p>
<h2>The Solution</h2>
<p>The solution for Kevin is to create the original XML file without
enclosing the paragraph in a CDATA section, making the image and
paragraph tags real elements in the source XML DOM, so that they can
be copied directly to the destination XHTML DOM. This small change to
the source XML gives us a very different source DOM tree:</p>
<ul style="border: solid 1x #333; background: #ccc;">
<li><code><entry></code><ul>
<li><code><title></code><ul>
<li><code>'entry with images'</code></li>
</ul></li>
<li><code><date></code><ul>
<li><code>'August 09, 2003'</code></li>
</ul></li>
<li><code><author></code><ul>
<li><code>'Kevin'</code></li>
</ul></li>
<li><code><idnum></code><ul>
<li><code>'000033'</code></li>
</ul></li>
<li><code><permalink></code><ul>
<li><code>'http://alazanto.org/xml/archives/000033.xml'</code></li>
</ul></li>
<li><code><body></code><ul>
<li><code><p></code><ul>
<li><code><img></code><ul>
<li><code>@class='archive'</code></li>
<li><code>@align='right'</code></li>
<li><code>@src='http://alazanto.org/images/sample.jpg'</code></li>
<li><code>@alt='photograph of a flower, just for show'</code></li>
</ul></li>
<li><code>'Mauris felis elit, varius quis, pulvinar vel, sodales vehicula, mi. Nunc elementum pharetra elit.'</code></li>
</ul></li>
</ul></li>
<li><code><more></code></li>
<li><code><comment-link></code><ul>
<li><code>'http://alazanto.org/xml/archives/000033_comments.xml'</code></li>
</ul></li>
<li><code><comment-count></code><ul>
<li><code>'6'</code></li>
</ul></li>
</ul></li>
</ul>
<p>With this input, the XSLT to copy the nodes can be just as simple,
using <code>xsl:copy-of</code> to copy all the elements <em>under</em>
the source <code><body></code> element, but not the element
itself:</p>
<pre style="border: solid 1x #333; background: #ccc;"><xsl:template match="entry">
<div class="entry">
<h2><xsl:value-of select="title"/></h2>
<xsl:copy-of select="body/*"/>
</div>
</xsl:template></pre>
<p>By copying elements instead of literal XHTML source code, Mozilla
displays the page from the correct DOM tree, and it works just as well with
Internet Explorer and external XSLT processors. The result looks very
similar to the input DOM:</p>
<ul style="border: solid 1x #333; background: #ccc;">
<li><code><div></code><ul>
<li><code>@class='entry'</code></li>
<li><code><h2></code><ul>
<li><code>'entry with images'</code></li>
</ul></li>
<li><code><p></code><ul>
<li><code><img></code><ul>
<li><code>@class='archive'</code></li>
<li><code>@align='right'</code></li>
<li><code>@src='http://alazanto.org/images/sample.jpg'</code></li>
<li><code>@alt='photograph of a flower, just for show'</code></li>
</ul></li>
<li><code>'Mauris felis elit, varius quis, pulvinar vel, sodales vehicula, mi. Nunc elementum pharetra elit.'</code></li>
</ul></li>
</ul></li>
</ul>
<p>You can see the result of this in <a
href="http://alazanto.org/xml/archives/000033.xml">Kevin’s
example XML weblog</a>, in any web browser that supports XSLT.</p>
<p>(Finally, thanks to Kevin for using the
<code><xsl:copy-of></code> element, which I’d managed to miss in
four years of reading the XSLT spec.)</p>
<h2>Further Reading</h2>
<ul>
<li>Meyer, Eric,
‘<a href="http://www.meyerweb.com/eric/comment/chech.html">Considered
Harmful Essays Considered Harmful</a>’, 2002.</li>
<li>Walsh, Norman,
‘<a href="http://www.xml.com/pub/a/2003/08/20/embedded.html">Escaped
Markup Considered Harmful</a>’, <cite>XML.com</cite>, 2003.</li>
<li>Rossney, Robert, ‘<a href="http://web.archive.org/web/20050301093936/http://www.azureus.com/xml/art_creating_cdata_sections_in_xslt.htm">Creating CDATA sections with XSLT</a>’, 2002.</li>
</ul>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-2287334962409609224.post-20986515873758360601999-11-28T15:43:00.000+13:002011-10-22T17:32:09.888+13:00Perl File::SyncThis module provides the POSIX <span style="font-family: "Courier New",Courier,monospace;">fsync()</span> function call to Perl. It has been obsoleted by <a href="http://perldoc.perl.org/IO/Handle.html#$io-%3Esync" style="font-family: "Courier New",Courier,monospace;">IO::Handle</a>, but you can still download it here, or from <a href="http://search.cpan.org/%7Ecevans/File-Sync-0.09/">CPAN</a>.<br />
<ul>
<li><a href="http://carey.geek.nz/code/perl-file-sync/File-Sync-0.09.tar.gz">File-Sync-0.09.tar.gz</a> (4KB)</li>
</ul>
The module is licensed under the same license as Perl itself.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-52937725793706067971999-08-26T23:26:00.000+12:002013-04-06T14:02:29.598+13:00Humorous RFCs<p>This is a collection of Internet standards documents, with a
difference from the usual ones describing the intricacies of
negotiating the parameters of a PPP connection, for example. Many of
them were published on April 1. A similar list to this one is
available from the <a href="http://www.apps.ietf.org/">IETF Applications Area</a>’s
<a href="http://www.apps.ietf.org/rfc/apr1list.html">April 1st/Humor RFCs</a>.</p>
<p>The links on this pages lead to the
<a href="http://tools.ietf.org/html/">HTML-formatted RFCs at the IETF</a>.</p>
<p>Last updated: 6 April 2013.</p>
<a name='more'></a>
<h2 id="april1">April 1</h2>
<dl>
<dt><a href="http://tools.ietf.org/html/rfc748">RFC748</a></dt>
<dd>TELNET RANDOMLY-LOSE Option (M. Crispin, 1 April 1978)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1097">RFC1097</a></dt>
<dd>TELNET SUBLIMINAL-MESSAGE Option (B. Miller, 1 April 1989)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1149">RFC1149</a></dt>
<dd>A Standard for the Transmission of IP Datagrams on Avian Carriers (D. Waitzman, 1 April 1990)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1216">RFC1216</a></dt>
<dd>Gigabit Network Economics and Paradigm Shifts (Poorer Richard and Prof. Kynikos, 1 April 1991)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1217">RFC1217</a></dt>
<dd>Memo from the Consortium for Slow Commotion Research (CSCR) (V. Cerf, 1 April 1991)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1313">RFC1313</a></dt>
<dd>Today’s Programming for KRFC AM 1313 — Internet Talk Radio (C. Partridge, 1 April 1992)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1437">RFC1437</a></dt>
<dd>The Extension of MIME Content-Types to a New Medium (N. Borenstein and M. Linimon, 1 April 1993)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1438">RFC1438</a></dt>
<dd>Internet Engineering Taskforce — Statements of Boredom (L. Chapin and C. Huitema, 1 April 1993)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1605">RFC1605</a></dt>
<dd>SONET to Sonnet Translation (W. Shakespeare, 1 April 1994)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1606">RFC1606</a></dt>
<dd>A Historical Perspective On The Usage Of IP Version 9 (J. Onions, 1 April 1994)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1607">RFC1607</a></dt>
<dd>A View from the 21st Century (V. Cerf, 1 April 1994)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1776">RFC1776</a></dt>
<dd>The Address is the Message (S. Crocker, 1 April 1995)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1924">RFC1924</a></dt>
<dd>A Compact Representation of IPv6 Addresses (R. Elz, 1 April 1996)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1925">RFC1925</a></dt>
<dd>The Twelve Networking Truths (R. Callon, Editor, 1 April 1996)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1926">RFC1926</a></dt>
<dd>An Experimental Encapsulation of IP Datagrams on Top of ATM (J. Eriksson, 1 April 1996)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1927">RFC1927</a></dt>
<dd>Suggested Additional MIME Types for Associating Documents (C. Rogers, 1 April 1996)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2321">RFC2321</a></dt>
<dd>RITA — The Reliable Internetwork Troubleshooting Agent (A. Bressen, 1 April 1998)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2322">RFC2322</a></dt>
<dd>Management of IP numbers by peg-dhcp (K. van den Hout, A. Koopal, R. van Mook, 1 April 1998)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2323">RFC2323</a></dt>
<dd>IETF Identification and Security Guidelines (A. Ramos, 1 April 1998)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2324">RFC2324</a></dt>
<dd>Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) (L. Masinter, 1 April 1998)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2325">RFC2325</a></dt>
<dd>Definitions of Managed Objects for Drip-Type Heated Beverage Hardware Devices using SMIv2 (M. Slavitch, 1 April 1998)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2549">RFC2549</a></dt>
<dd>IP over Avian Carriers with Quality of Service (D. Waitzman, 1 April 1999)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2550">RFC2550</a></dt>
<dd>Y10K and Beyond (S. Glassman, M. Manasse and J. Mogul, 1 April 1999)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2551">RFC2551</a></dt>
<dd>The Roman Standards Process — Revision III (S. Bradner, I April MCMXCIX)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2795">RFC2795</a></dt>
<dd>The Infinite Monkey Protocol Suite (IMPS) (S. Christey, 1 April 2000)</dd>
<dt><a href="http://tools.ietf.org/html/rfc3091">RFC3091</a></dt>
<dd>Pi Digit Generation Protocol (H. Kennedy, 1 April 2001)</dd>
<dt><a href="http://tools.ietf.org/html/rfc3092">RFC3092</a></dt>
<dd>Etymology of “Foo” (D. Eastlake 3rd, C. Manros and E. Raymond, 1 April 2001)</dd>
<dt><a href="http://tools.ietf.org/html/rfc3093">RFC3093</a></dt>
<dd>Firewall Enhancement Protocol (FEP) (M. Gaynor and S. Bradner, 1 April 2001)</dd>
<dt><a href="http://tools.ietf.org/html/rfc3251">RFC3251</a></dt>
<dd>Electricity over IP (B. Rajagopalan, 1 April 2002)</dd>
<dt><a href="http://tools.ietf.org/html/rfc3252">RFC3252</a></dt>
<dd>Binary Lexical Octet Ad-hoc Transport (H. Kennedy, 1 April 2002)</dd>
<dt><a href="http://tools.ietf.org/html/rfc3514">RFC3514</a></dt>
<dd>The Security Flag in the IPv4 Header (S. Bellovin, 1 April 2003)</dd>
<dt><a href="http://tools.ietf.org/html/rfc3751">RFC3751</a></dt>
<dd>Omniscience Protocol Requirements (S. Bradner, 1 April 2004)</dd>
<dt><a href="http://tools.ietf.org/html/rfc4041">RFC4041</a></dt>
<dd>Requirements for Morality Sections in Routing Area Drafts (A. Farrel, 1 April 2005)</dd>
<dt><a href="http://tools.ietf.org/html/rfc4042">RFC4042</a></dt>
<dd>UTF-9 and UTF-18 Efficient Transformation Formats of Unicode (M. Crispin, 1 April 2005)</dd>
<dt><a href="http://tools.ietf.org/html/rfc4824">RFC4824</a></dt>
<dd>The Transmission of IP Datagrams over the Semaphore Flag Signaling System (SFSS) (J. Hofmueller, A. Bachman, IO. zmoelnig, 1 April 2007)</dd>
<dt><a href="http://tools.ietf.org/html/rfc5241">RFC5241</a></dt>
<dd>Naming Rights in IETF Protocols (A. Falk, S. Bradner, 1 April 2008)</dd>
<dt><a href="http://tools.ietf.org/html/rfc5242">RFC5242</a></dt>
<dd>A Generalized Unified Character Code: Western European and CJK Sections (J. Klensin, H. Alvestrand, 1 April 2008)</dd>
<dt><a href="http://tools.ietf.org/html/rfc5513">RFC5513</a></dt>
<dd>IANA Considerations for Three Letter Acronyms (A. Farrel, 1 April 2009)</dd>
<dt><a href="http://tools.ietf.org/html/rfc5514">RFC5514</a></dt>
<dd>IPv6 over Social Networks (E. Vyncke, 1 April 2009)</dd>
<dt><a href="http://tools.ietf.org/html/rfc5841">RFC5841</a></dt>
<dd>TCP Option to Denote Packet Mood (R. Hay, W. Turkal, 1 April 2010)</dd>
<dt><a href="http://tools.ietf.org/html/rfc5984">RFC5984</a></dt>
<dd>Increasing Throughput in IP Networks with ESP-Based Forwarding (K-M. Moller, 1 April 2011)</dd>
<dt><a href="http://tools.ietf.org/html/rfc6214">RFC6214</a></dt>
<dd>Adaptation of RFC 1149 for IPv6 (B. Carpenter, R. Hinden, 1 April 2011)</dd>
<dt><a href="http://tools.ietf.org/html/rfc6217">RFC6217</a></dt>
<dd>Regional Broadcast Using an Atmospheric Link Layer (T. Ritter, 1 April 2011)</dd>
<dt><a href="http://tools.ietf.org/html/rfc6592">RFC6592</a></dt>
<dd>The Null Packet (C. Pignataro, 1 April 2012)</dd>
<dt><a href="http://tools.ietf.org/html/rfc6593">RFC6593</a></dt>
<dd>Service Undiscovery Using Hide-and-Go-Seek for the Domain Pseudonym System (DPS) (C. Pignataro, J. Clarke, G. Salgueiro, 1 April 2012)</dd>
<dt><a href="http://tools.ietf.org/html/rfc6919">RFC6919</a></dt>
<dd>Further Key Words for Use in RFCs to Indicate Requirement Levels (R. Barnes, S. Kent, E. Rescorla, 1 April 2013)</dd>
<dt><a href="http://tools.ietf.org/html/rfc6921">RFC6921</a></dt>
<dd>Design Considerations for Faster-Than-Light(FTL) Communication (A. Falk, S. Bradner, 1 April 2013)</dd>
</dl>
<h2 id="poetry">Poetry</h2>
<dl>
<dt><a href="http://tools.ietf.org/html/rfc527">RFC527</a></dt>
<dd>ARPAWOCKY (R. Merryman, 22 June 1973)</dd>
<dt><a href="http://tools.ietf.org/html/rfc968">RFC968</a></dt>
<dd>Twas the Night Before Start-up (V. Cerf, December 1985)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1121">RFC1121</a></dt>
<dd>Act One — The Poems (J. Postel, L. Kleinrock, V. Cerf and B. Boehm, September 1989)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1300">RFC1300</a></dt>
<dd>Remembrances of Things Past (S. Greenfield, February 1992)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1882">RFC1882</a></dt>
<dd>The 12 Days of Technology Before Christmas (B. Hancock, December 1995)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2100">RFC2100</a></dt>
<dd>The Naming of Hosts (J. Ashworth, 1 April 1997)</dd>
</dl>
<h2 id="misc">Miscellaneous</h2>
<dl>
<dt><a href="http://tools.ietf.org/html/rfc602">RFC602</a></dt>
<dd>The Stockings Were Hung by the Chimney with Care (B. Metcalfe, December 1973)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1439">RFC1439</a></dt>
<dd>The Uniqueness of Unique Identifiers (C. Finseth, March 1993)</dd>
<dt><a href="http://tools.ietf.org/html/rfc1876">RFC1876</a></dt>
<dd>A Means for Expressing Location Information in the Domain Name System (C. Davis, P. Vixie, T. Goodwin, I. Dickinson, January 1996)</dd>
<dt><a href="http://tools.ietf.org/html/rfc2410">RFC2410</a></dt>
<dd>The NULL Encryption Algorithm and Its Use With IPsec (R. Glenn and S. Kent, November 1998)</dd>
</dl>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-23388605331293325601998-11-08T21:55:00.000+13:002011-11-27T08:07:45.376+13:00Using x3270 with an IBM AS/400<p>There have been a few questions asked on <a href="http://groups.google.com/group/comp.sys.ibm.as400.misc">comp.sys.ibm.as400.misc</a> about
accessing an AS/400 “green screen” display from Unix. This page
describes how I had it set it up very nicely under Linux using the
<a href="http://x3270.bgp.nu/">x3270 terminal emulator.</a></p>
<a name='more'></a>
<p>My environment was:</p>
<ul>
<li>A model 4609-510 AS/400 with OS/400 V4R2, and configured for
TCP/IP on an Ethernet LAN.</li>
<li>A IBM PC with a Pentium processor running <a href="http://www.debian.org/">Debian GNU/Linux</a> 2.0.</li>
<li>The version of x3270 from this version of Debian, which is
3.1.1.9.</li>
<li>I’ve used this basic setup for versions of x3270 from before
3.1.1.5, and from OS/400 V3R6.</li>
</ul>
<p>(Since I first wrote this document, a few links to it have
appeared on various web pages, and I’ve started then stopped
maintaining x3270 for Debian.)</p>
<h4>Introduction</h4>
<p>The first thing to do is to get x3270 compiled, installed and
configured to connect to the AS/400 system. This is all fairly well
covered in x3270’s documentation, so I won’t expand on it here.</p>
<p>When you connect to the AS/400 using x3270, you will (surprise!)
be using a 3270 data stream, which the AS/400 converts to a 5250 data
stream for you. Recent versions of x3270 emulate a 3279 device, which
has the enhanced features necessary for all the colours and
highlighting to be displayed. In fact, I found the effects to be
closer to what is described in the <a href="http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AUI01/3.36.2">DDS
Reference</a> than any other PC emulator.</p>
<h4>System Request support</h4>
<p>A problem with all official releases of x3270 up to 3.1.1.7, is
that there is no way to use System Request to interrupt a display that
has the keyboard locked. The new TN3270E RFC defines the 3270 Attn
function as sending a telnet ‘Interrupt Process’ code, which is not
what x3270 normally sends. It turns out that the AS/400 supports this
code for System Request.</p>
<p>For System Request to work properly, I recommend compiling the
latest version of x3270.</p>
<h4>Configuring for AS/400</h4>
<p>All the configuration you need should be taken care of by my <a href="http://carey.geek.nz/doc/x3270-as400/x3270pro">.x3270pro</a> file. Make sure there’s nothing you
want to keep in your current one, then drop mine in your home
directory. If you’re the latest version of x3270, use the <a href="http://carey.geek.nz/doc/x3270-as400/x3270pro.patches">.x3270pro patched</a> file instead. Then start
up x3270 and try it!</p>
<p>This is what the file actually does:</p>
<ul>
<li>The first long section following
“<samp>x3270.keymap.5250</samp>” defines a new keyboard mapping that
translates the key you press (like F2) into what the AS/400 emulator
wants to see (PA1 followed by PF2). A special one is Shift-Home,
which is useful with SDA. You’ll know if you need it.</li>
<li>You must use a model 2 (with an 80x24 screen) because that’s
the size of screen the AS/400 draws on.</li>
<li>I use the ‘alt’ character set to enable my Alt key,
overridden by the 5250 mappings above.</li>
<li>The ‘us-intl’ character set seems to correspond almost
exactly with CCSID 37, which is the default CCSID at my site. This
represents the US English code page. In particular, the brackets ‘[’
and ‘]’ work. (See some of the members in QSYSINC/H for examples.)
Only the pilcrow sign ‘¶’ is represented differently.</li>
<li>‘blankFill’ makes entry fields work better when inserting at
the start.</li>
</ul>
<h4>Problems</h4>
<ul>
<li>Unfortunately, the 3270 display does not support the keyboard
shift and validation of a real 5250 and these functions are provided
by the AS/400. This means that input in an uppercase only field will
appear however you type it.</li>
<li>The Field Exit, Field + and Field - keys are not supported by
the AS/400’s emulation, so my key mappings simulate it by erasing to
the end of the field then tabbing to the next field. This usually
works fine except with negative numbers, which I have trouble with.
ISTR having other problems on V3R6.</li>
</ul>
<h4>Links</h4>
<ul>
<li>Mike Madore and others are working on a
<a href="http://tn5250.sf.net/">5250 emulator</a> for Linux.</li>
<li>IETF <a href="http://www.ietf.org/html.charters/OLD/tn3270e-charter.html">Telnet TN3270 Enhancements</a> working group</li>
<li><a href="http://publib.boulder.ibm.com/pubs/html/as400/online/homeeng1.htm">IBM AS/400 online manuals</a></li>
<li><a href="http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3ANL01/8.4">TCP/IP
Configuration and Reference V4R2 / TELNET Server / 3270 Full-Screen
Mode</a></li>
<li><a href="http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AUI01/D.0">DDS
Reference V4R2 / DDS for 3270 Remote Attachment</a></li>
<li><a href="http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/QB3AQ501/CCONTENTS">International
Application Development V4R2</a> — Appendices A and F</li>
</ul>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-2287334962409609224.post-69155116170165565731998-08-10T19:00:00.000+12:002011-10-24T08:13:33.854+13:00Introduction to Scripting<p>In August 1998, the local <a href="http://christchurch.lug.net.nz/">Linux
Users’ Group</a> had a meeting for its members, where three presentations
were given about topics related to Linux. This page links to
materials from my presentation about scripting.</p>
<p>My presentation focussed on four languages:</p>
<ul>
<li>sh</li>
<li><a href="http://www.tcl.tk/">Tcl</a></li>
<li><a href="http://www.perl.com/">Perl</a></li>
<li><a href="http://www.python.org/">Python</a></li>
</ul>
<p>You can download three files containing material for my presentation:</p>
<ul>
<li>The <a href="http://carey.geek.nz/doc/script-intro/scriptintro.pdf">PDF file of the slides</a>;</li>
<li>The <a href="http://carey.geek.nz/doc/script-intro/scriptintro.tex">LaTeX source</a> for the slides;</li>
<li>The gzipped tar file containing the <a href="http://carey.geek.nz/doc/script-intro/scriptex-1.1.tar.gz">example scripts</a> I prepared.</li>
</ul>
<p>Not all the examples described in the slides were written. The GUI
example was not written for sh, because there is no GUI library
available on Linux. With <a
href="http://www.opengroup.org/desktop/cde/">CDE</a> installed, there
might be dtksh, but I’ve never used CDE. The scripts to check a web
page were not written due to lack of time.</p>Unknownnoreply@blogger.com