<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Random Things</title>
	<atom:link href="http://www.edna.narrabilis.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edna.narrabilis.com</link>
	<description></description>
	<lastBuildDate>Sat, 18 Jul 2009 15:07:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Group Management in MAC-OS</title>
		<link>http://www.edna.narrabilis.com/2009/07/18/group-management-in-mac-os/</link>
		<comments>http://www.edna.narrabilis.com/2009/07/18/group-management-in-mac-os/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 15:04:48 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[MAC-OS]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/?p=56</guid>
		<description><![CDATA[By default /etc/group  is consulted only in single-user mode, so that is not the way to deal with group membership under MAC-OS.
The command line utility dseditgroup is the way to go: 
dseditgroup -o create -i 1000 newgroup 
will create a new group called newgroup with gid 1000
dseditgroup -o edit -a someuser newgroup
Will add an [...]]]></description>
			<content:encoded><![CDATA[<p>By default <code>/etc/group </code> is consulted only in single-user mode, so that is not the way to deal with group membership under MAC-OS.</p>
<p>The command line utility <code>dseditgroup</code> is the way to go: </p>
<p><code>dseditgroup -o create -i 1000 newgroup</code> </p>
<p>will create a new group called <code>newgroup</code> with gid 1000</p>
<p><code>dseditgroup -o edit -a someuser newgroup</code></p>
<p>Will add an (existing) user <code>someuser</code> to <code>newgroup</code></p>
<p><code>dsedtigroup -o read newgroup</code></p>
<p>will display the properties of the group <code>newgroup</code></p>
<p><code>dseditgroup -o delete newgroup</code></p>
<p>will delete the group <code>newgroup</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2009/07/18/group-management-in-mac-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal subsites and apache conf files</title>
		<link>http://www.edna.narrabilis.com/2009/01/16/drupal-subsites-and-apache-conf-files/</link>
		<comments>http://www.edna.narrabilis.com/2009/01/16/drupal-subsites-and-apache-conf-files/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 20:16:00 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/?p=50</guid>
		<description><![CDATA[We wanted 1 drupal installation (on a RedHat server, installed under /var/www/html/drupal) with a few
subsites. In the past we achieved this with many symbolic links which
gets hard to manage after a while.
Another possibility is creating CNAMES for the different subsites but
that also has its set of issues (updating dns, getting certificates&#8230;)
The solution was to create [...]]]></description>
			<content:encoded><![CDATA[<p>We wanted 1 drupal installation (on a RedHat server, installed under <code>/var/www/html/drupal</code>) with a few<br />
subsites. In the past we achieved this with many symbolic links which<br />
gets hard to manage after a while.</p>
<p>Another possibility is creating CNAMES for the different subsites but<br />
that also has its set of issues (updating dns, getting certificates&#8230;)</p>
<p>The solution was to create a special configuration file (in<br />
<code>/etc/httpd/conf.d</code>), as follows:</p>
<p><code><br />
&lt;Directory /var/www/html/drupal&gt;<br />
&nbsp;&nbsp; Options FollowSymLinks<br />
&nbsp;&nbsp; RewriteEngine on<br />
&nbsp;<br />
&nbsp;&nbsp; RewriteCond %{REQUEST_FILENAME} !-f<br />
&nbsp;&nbsp; RewriteCond %{REQUEST_FILENAME} !-d<br />
&nbsp;&nbsp; RewriteCond %{THE_REQUEST} /subsite1/<br />
&nbsp;&nbsp; RewriteRule ^(.*)$ /drupal6/subsite1/?q=$1&nbsp;&nbsp;[L]<br />
&nbsp;<br />
&nbsp;&nbsp; RewriteCond %{REQUEST_FILENAME} !-f<br />
&nbsp;&nbsp; RewriteCond %{REQUEST_FILENAME} !-d<br />
&nbsp;&nbsp; RewriteCond %{THE_REQUEST} /subsite2/<br />
&nbsp;&nbsp; RewriteRule ^(.*)$ /drupal6/subsite2/?q=$1&nbsp;&nbsp;[L]<br />
&nbsp;<br />
&nbsp;&nbsp; RewriteCond %{REQUEST_FILENAME} !-f<br />
&nbsp;&nbsp; RewriteCond %{REQUEST_FILENAME} !-d<br />
&nbsp;&nbsp; RewriteCond %{THE_REQUEST} /<br />
&nbsp;&nbsp; RewriteRule ^(.*)$ /drupal/?q=$1&nbsp;&nbsp;[L]<br />
&lt;/Directory&gt;<br />
&nbsp;<br />
Alias /drupal/subsite1 &quot;/var/www/html/drupal&quot;<br />
Alias /drupal/subsite2 &quot;/var/www/html/drupal&quot;<br />
&nbsp;<br />
</code></p>
<p>The idea is that in each of the 4 line blocks take a url which does not<br />
correspond to a physical file or directory, and if it matches a<br />
particular string (say &#8217;subsite1&#8242;) it rewrites the url in a way which is<br />
understandable by drupal (all of this happens in a <directory> block<br />
which refers to <code>/var/www/html/drupal</code> so everything is relative to<br />
<code>/drupal</code> )</p>
<p>The Alias lines at the end of the file are needed to point urls which<br />
start with /drupal to the correct directory.</p>
<p>So any new site necessitates the addition of a new 4 line block and a<br />
new Alias line, and then restarting apache. Definitely easier than the<br />
other solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2009/01/16/drupal-subsites-and-apache-conf-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stunnel for mysql &#8211; server and client</title>
		<link>http://www.edna.narrabilis.com/2006/06/01/stunnel-for-mysql-server-and-client/</link>
		<comments>http://www.edna.narrabilis.com/2006/06/01/stunnel-for-mysql-server-and-client/#comments</comments>
		<pubDate>Thu, 01 Jun 2006 15:34:32 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/2006/06/01/stunnel-for-mysql-server-and-client/</guid>
		<description><![CDATA[We needed to set up an stunnel to the mysql server (mysql.example.com), 

 so that the client (client.example.com) and the server can communicate over an encrypted tunnel. Stunnel was already installed on both linux machines &#8211; it is avaialble from http://stunnel.org. The steps taken on mysql.example.com were:

cd /etc/stunnel
Create a certificate:
openssl req&#160;&#160; -x509 -nodes -days 365&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>We needed to set up an stunnel to the mysql server (<code>mysql.example.com</code>), <span style="float:left; margin-right: 2em; margin-top: 1em; margin-bottom: 1em;"><script type="text/javascript"><!--
google_ad_client = "pub-8771063603940634";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></span> so that the client (<code>client.example.com</code>) and the server can communicate over an encrypted tunnel. <span id="more-48"></span>Stunnel was already installed on both linux machines &#8211; it is avaialble from <a href="http://stunnel.org">http://stunnel.org</a>. The steps taken on <code>mysql.example.com</code> were:</p>
<ol>
<li><code>cd /etc/stunnel</code></li>
<li>Create a certificate:<br />
<code>openssl req&nbsp;&nbsp; -x509 -nodes -days 365&nbsp;&nbsp; -newkey rsa:1024 \<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -keyout stunnel.pem -out stunnel.pem </code></li>
<li>The <code>stunnel.conf</code> file contains the following lines:
<p><code>cert = /etc/stunnel/stunnel.pem<br />
setuid = nobody<br />
setgid = nobody<br />
pid = /tmp/stunnel.pid<br />
debug = 7<br />
output = stunnel.log<br />
[mysqls]<br />
accept&nbsp;&nbsp;= 3309<br />
connect = 3306<br />
</code></p>
</li>
<li><code>stunnel</code>is started</li>
</ol>
<p>The steps taken on <code>client.example.com</code> were:</p>
<ol>
<li>Create a certificate as above (not strictly necessary but otherwise the connection is open to a man in the middle attack)</li>
<li><code>stunnel.conf</code> contains the following lines:
<p><code><br />
cert =/etc/stunnel/stunnel.pem<br />
pid = /tmp/stunnel.pid<br />
setuid = nobody<br />
setgid = nobody<br />
debug=7<br />
output=stunnel.log<br />
client = yes<br />
[3309]<br />
accept&nbsp;&nbsp;= 3309<br />
connect = mysql.example.com:3309<br />
</code></p>
</li>
<li><code>stunnel</code> is started</li>
<li>The <code>mysql</code> client is invoked with the following:<br />
<code>mysql -h mysql.example.com -u mysqluser -p -P 3309</code><br />
The hostname must be specified so that <code>mysql</code> will not attempt to bind with a local <code>mysqld</code> via a local socket.<br />
<code>mysqluser</code> needs to be granted rights on the appropriate databases with the host being <code>localhost.localdomain</code>. Something like<br />
<code>grant all on db.* to mysqluser@&#039;localhost.localdomain&#039; identified by &#039;SecretPw&#039;;</code><br />
(this is done on a mysql client running on <code>mysql.example.com</code> by an administrator).</ol>
<p>We had another requirement: we had to establish tunneled <code>mysql</code> connections from <code>mysql.example.com</code> to <code>topmysql.example.com</code>. So we created on <code>mysql.example.com</code> the directory <code>/etc/stunnel-client</code> with the client configuration as above. We started a second instance of <code>stunnel</code>, specifying the new config:<br />
<code>stunnel /etc/stunnel-client/stunnel-client.conf</code></p>
<p><code>topmysql.example.com</code> was set up as an <code>stunnel</code> server as above, and everything worked as expected.</p>
<p>The only thing left to do is firewall off the unencrypted mysql connections on both servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2006/06/01/stunnel-for-mysql-server-and-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A thought</title>
		<link>http://www.edna.narrabilis.com/2006/04/26/plagiarism-related-thought/</link>
		<comments>http://www.edna.narrabilis.com/2006/04/26/plagiarism-related-thought/#comments</comments>
		<pubDate>Wed, 26 Apr 2006 12:41:33 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[truly random]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/2006/04/26/plagiarism-related-thought/</guid>
		<description><![CDATA[The nice thing about lies is that they do not need to be consistent &#8211; that is an obvious disadvantage of truthful statements.
]]></description>
			<content:encoded><![CDATA[<p>The nice thing about lies is that they do not need to be consistent &#8211; that is an obvious disadvantage of truthful statements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2006/04/26/plagiarism-related-thought/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The pesky TEXINPUTS</title>
		<link>http://www.edna.narrabilis.com/2006/04/21/the-pesky-texinputs/</link>
		<comments>http://www.edna.narrabilis.com/2006/04/21/the-pesky-texinputs/#comments</comments>
		<pubDate>Fri, 21 Apr 2006 16:04:35 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[latex]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/2006/04/21/the-pesky-texinputs/</guid>
		<description><![CDATA[pdflatex was giving this error:

&#160;&#160; Error: pdflatex (file pdftex.cfg): cannot open config file
&#160;&#160;==&#62; Fatal error occurred, the output PDF file is not finished!



This was on a linux system, with tetex installed from rpms, so was puzzling.
Turns out some users had TEXINPUTS set. As it was set /usr/share/texmf/tex, latex worked ok, but pdflatex bombed. At least [...]]]></description>
			<content:encoded><![CDATA[<p><code>pdflatex</code> was giving this error:<br />
<code><br />
&nbsp;&nbsp; Error: pdflatex (file pdftex.cfg): cannot open config file<br />
&nbsp;&nbsp;==&gt; Fatal error occurred, the output PDF file is not finished!<br />
</code><span id="more-46"></span><span style="float:left; margin-right: 2em; margin-top: 1em; margin-bottom: 1em;"><script type="text/javascript"><!--
google_ad_client = "pub-8771063603940634";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></span><br />
This was on a linux system, with tetex installed from rpms, so was puzzling.<br />
Turns out some users had TEXINPUTS set. As it was set <code>/usr/share/texmf/tex</code>, latex worked ok, but pdflatex bombed. At least was easy to fix!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2006/04/21/the-pesky-texinputs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Explorer Homepage</title>
		<link>http://www.edna.narrabilis.com/2006/04/10/internet-explorer-homepage/</link>
		<comments>http://www.edna.narrabilis.com/2006/04/10/internet-explorer-homepage/#comments</comments>
		<pubDate>Mon, 10 Apr 2006 12:40:14 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/2006/04/10/internet-explorer-homepage/</guid>
		<description><![CDATA[I finally fixed the problem I had with Ineternet Explorer (under Windows XP). It kept resetting the homepage to www.msn.com .   Changing the value of the registry key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\Start Page to point at the correct homepage did the trick. Now if only my bank did not insist on IE&#8230;
]]></description>
			<content:encoded><![CDATA[<p>I finally fixed the problem I had with Ineternet Explorer (under Windows XP). It kept resetting the homepage to www.msn.com . <span id="more-45"></span> <span style="float:left; margin-right: 2em; margin-top: 1em; margin-bottom: 1em;"><!--adsense#side_button--></span> Changing the value of the registry key <code>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\Start Page</code> to point at the correct homepage did the trick. Now if only my bank did not insist on IE&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2006/04/10/internet-explorer-homepage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Apache and PHP on Windows</title>
		<link>http://www.edna.narrabilis.com/2006/03/22/installing-apache-and-php-on-windows/</link>
		<comments>http://www.edna.narrabilis.com/2006/03/22/installing-apache-and-php-on-windows/#comments</comments>
		<pubDate>Wed, 22 Mar 2006 15:26:21 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/2006/03/22/installing-apache-and-php-on-windows/</guid>
		<description><![CDATA[Yesterday was the first time I installed apache and php on windows! The apache 2 installer worked out of the box, but I had 2 annoyances with php. 
I decided to do the manual install, as recommended. Following all the steps was easy, but to get it to work, I had to make the following [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday was the first time I installed apache and php on windows! The apache 2 installer worked out of the box, but I had 2 annoyances with php. <span id="more-44"></span></p>
<p><span style="float:left; margin-right: 2em; margin-top: 1em; margin-bottom: 1em;"><!--adsense#side_button--></span>I decided to do the manual install, as recommended. Following all the steps was easy, but to get it to work, I had to make the following changes:
<ol>
<li>The <code>LoadModule </code> directive needs to specify the sapi subdirectory, so if the files are in <code>C:\php</code>, the correct directive in <code>httpd.conf</code> should be<br />
<code>LoadModule php4_module &quot;c:/php/sapi/php4apache2.dll&quot;</code></li>
<li>I needed the gd extension, so I uncommented the <code>extension=php_gd2.dll</code> in <code>php.in</code> (a copy of <code>php.ini-recommended</code>), but that was not good enough. I had to modify the <code>extension_dir</code> setting in <code>php.ini</code> to point at the extensions subdirectory, e.g. <code>extension_dir = &quot;c:/php/extensions&quot;</code>. After restarting apache everything worked as expected.<br />
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2006/03/22/installing-apache-and-php-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Multiple Keyboards for Accented Characters</title>
		<link>http://www.edna.narrabilis.com/2006/03/14/multiple-keyboards-for-accented-characters/</link>
		<comments>http://www.edna.narrabilis.com/2006/03/14/multiple-keyboards-for-accented-characters/#comments</comments>
		<pubDate>Tue, 14 Mar 2006 15:39:45 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/2006/03/14/multiple-keyboards-for-accented-characters/</guid>
		<description><![CDATA[Entering accented or other &#8220;unusual&#8221; characters in a web-form is a recurring problem, which is usually solved by placing a virtual keyboard on the page. I find these annoying as they take up real estate on the page and are not used most of the time. Moreover, I needed more than 1 keyboard (e.g. for [...]]]></description>
			<content:encoded><![CDATA[<p>Entering accented or other &#8220;unusual&#8221; characters in a web-form is a recurring problem, which is usually solved by placing a <strong>virtual keyboard</strong> on the page. I find these annoying <span id="more-41"></span>as they take up real estate on the page and are not used most of the time. Moreover, I needed more than 1 keyboard (e.g. for entering last name and first name). I came up with a form with the following characteristics:</p>
<ul>
<li>At most one visible keyboard</li>
<li>Keyboard disappears when any textbox is clicked</li>
<li>As long as keyboard is visible, clicking on it will enter characters into the calling field</li>
</ul>
<p><span style="float:left; margin-right: 2em; margin-top: 1em; margin-bottom: 1em;"><!--adsense#side_button--></span><strong>The HTML for the form</strong></p>
<p><code><br />
&lt;form&nbsp;&nbsp;method=&quot;post&quot; action=&quot;enter.php&quot;&gt;<br />
&lt;table summary=&quot;new person&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=&quot;label&quot;&gt;Last Name:&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=&quot;element&quot;&gt;&lt;input id=&quot;inpa&quot; onclick=&quot;hideallkbs()&quot; name=&quot;lastname&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;&lt;br /&gt;<br />
&lt;INPUT TYPE=button onclick=&quot;hideallkbs();vis(&#039;aTable&#039;)&quot; VALUE=&quot;Keyboard&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=&quot;label&quot;&gt;First Name:&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td class=&quot;element&quot;&gt;&lt;input id=&quot;inpb&quot; onclick=&quot;hideallkbs()&quot; name=&quot;firstname&quot; type=&quot;text&quot; value=&quot;&quot; /&gt;&lt;br /&gt;<br />
&lt;INPUT TYPE=button onclick=&quot;hideallkbs();vis(&#039;bTable&#039;)&quot; VALUE=&quot;Keyboard&quot; /&gt;&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;<br />
&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;/td&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;&lt;input name=&quot;submit&quot; value=&quot;Enter Personal Data&quot; type=&quot;submit&quot; /&gt;&amp;nbsp;&lt;input name=&quot;reset&quot; value=&quot;Reset&quot; type=&quot;reset&quot; /&gt;&lt;/td&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;<br />
</code></p>
<p>The <strong>functions</strong> used in this html are <code>hideblks()</code>, which hides the keyboards and <code>vis()</code>, which makes a particular one visible:</p>
<p><code><br />
&lt;script language=&quot;Javascript&quot; type=&quot;text/javascript&quot;&gt;<br />
&nbsp;<br />
function kb(ID,sText) {<br />
&nbsp;&nbsp;bar = document.getElementById(ID);<br />
&nbsp;&nbsp;if(bar) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;bar.value += sText;<br />
&nbsp;&nbsp;}<br />
}<br />
&nbsp;<br />
function vis(ID) {<br />
&nbsp;&nbsp;bar = document.getElementById(ID);<br />
&nbsp;&nbsp;if(bar) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;bar.style.display&nbsp;&nbsp;=&#039;block&#039;;<br />
&nbsp;&nbsp;}<br />
}<br />
&nbsp;<br />
function hideallkbs() {<br />
&nbsp;&nbsp;var tables = document.getElementsByTagName(&quot;TABLE&quot;) ;<br />
&nbsp;&nbsp;for(var i=0; i&lt;tables.length; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;if(&quot;kbdisplay&quot; == tables[i].className) tables[i].style.display = &#039;none&#039;;<br />
&nbsp;&nbsp;}<br />
}<br />
&lt;/script&gt;<br />
</code></p>
<p>The <code>kb()</code> function will be used below, in defining the action of each clicked key in the keyboard. Before that, we define some <strong>CSS</strong>:<br />
<code><br />
&lt;STYLE TYPE=&quot;text/css&quot;&gt;<br />
&lt;!&#45;-<br />
.kbdisplay {<br />
&nbsp;&nbsp;font-family: Verdana, Arial, Helvetica, sans-serif;<br />
&nbsp;&nbsp;font-size: 10px;<br />
&nbsp;&nbsp;width: 600px;<br />
&nbsp;&nbsp;font-weight: normal;<br />
&nbsp;&nbsp;text-transform: none;<br />
}&nbsp;&nbsp;<br />
td.kbkey {<br />
&nbsp;&nbsp;border-top:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1px solid #000000;<br />
&nbsp;&nbsp;border-bottom:&nbsp;&nbsp;&nbsp;&nbsp;1px solid #000000;<br />
&nbsp;&nbsp;border-left:&nbsp;&nbsp;&nbsp;&nbsp;0px solid #000000;<br />
&nbsp;&nbsp;border-right:&nbsp;&nbsp;&nbsp;&nbsp;0px solid #000000;<br />
}<br />
&nbsp;<br />
.abc { width: 30; }<br />
&#45;-&gt;<br />
&lt;/STYLE&gt;<br />
</code><br />
which should of course be defined in the document&#8217;s HEAD (or in a separate linked file).</p>
<p>Finally &#8211; here are the keyboards:<br />
<code><br />
&lt;TABLE class=&quot;kbdisplay&quot; ID=aTable STYLE=&quot;border-collapse:collapse; display:none&quot;&gt;<br />
&lt;tr&gt;<br />
&lt;td class=&quot;kbkey&quot;&gt;&lt;input type=&quot;button&quot; class=&quot;abc&quot; value=&quot;&amp;#192;&quot; onclick=&quot;kb(&#039;inpa&#039;, &#039;\xc0&#039;)&quot; /&gt;&lt;/td&gt;<br />
&lt;td class=&quot;kbkey&quot;&gt;&lt;input type=&quot;button&quot; class=&quot;abc&quot; value=&quot;&amp;#224;&quot; onclick=&quot;kb(&#039;inpa&#039;, &#039;\xe0&#039;)&quot; /&gt;&lt;/td&gt;<br />
&#46;...<br />
&lt;td class=&quot;kbkey&quot;&gt;&lt;input type=&quot;button&quot; class=&quot;abc&quot; value=&quot;&amp;#253;&quot; onclick=&quot;kb(&#039;inpa&#039;, &#039;\xfd&#039;)&quot; /&gt;&lt;/td&gt;<br />
&lt;td class=&quot;kbkey&quot;&gt;&lt;input type=&quot;button&quot; class=&quot;abc&quot; value=&quot;&amp;#255;&quot; onclick=&quot;kb(&#039;inpa&#039;, &#039;\xff&#039;)&quot; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&nbsp;<br />
&lt;/table&gt;<br />
&lt;TABLE class=&quot;kbdisplay&quot; ID=bTable STYLE=&quot;border-collapse:collapse; display:none&quot;&gt;<br />
&lt;tr&gt;<br />
&nbsp;<br />
&lt;td class=&quot;kbkey&quot;&gt;&lt;input type=&quot;button&quot; class=&quot;abc&quot; value=&quot;&amp;#192;&quot; onclick=&quot;kb(&#039;inpb&#039;, &#039;\xc0&#039;)&quot; /&gt;&lt;/td&gt;<br />
&lt;td class=&quot;kbkey&quot;&gt;&lt;input type=&quot;button&quot; class=&quot;abc&quot; value=&quot;&amp;#224;&quot; onclick=&quot;kb(&#039;inpb&#039;, &#039;\xe0&#039;)&quot; /&gt;&lt;/td&gt;<br />
&#46;...<br />
&lt;td class=&quot;kbkey&quot;&gt;&lt;input type=&quot;button&quot; class=&quot;abc&quot; value=&quot;&amp;#253;&quot; onclick=&quot;kb(&#039;inpc&#039;, &#039;\xfd&#039;)&quot; /&gt;&lt;/td&gt;<br />
&lt;td class=&quot;kbkey&quot;&gt;&lt;input type=&quot;button&quot; class=&quot;abc&quot; value=&quot;&amp;#255;&quot; onclick=&quot;kb(&#039;inpc&#039;, &#039;\xff&#039;)&quot; /&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&nbsp;<br />
&lt;/table&gt;<br />
</code></p>
<p>A complete example can be seen <a href="http://www.edna.narrabilis.com/wp-content/uploads/2006/03/kb.html">here</a>, and the correspoding code is here: <a href="http://www.edna.narrabilis.com/wp-content/uploads/2006/03/kb1.html">code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2006/03/14/multiple-keyboards-for-accented-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>doubleclick a radio button to remove selection</title>
		<link>http://www.edna.narrabilis.com/2006/03/09/doubleclick-a-radio-button-to-remove-selection/</link>
		<comments>http://www.edna.narrabilis.com/2006/03/09/doubleclick-a-radio-button-to-remove-selection/#comments</comments>
		<pubDate>Thu, 09 Mar 2006 15:26:54 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/2006/03/09/doubleclick-a-radio-button-to-remove-selection/</guid>
		<description><![CDATA[We needed to set up a group of radio buttons so that when any of them is doubleclicked any selection in the group is removed. . The following javascript snippet sets up the function kp() which removes all selections upon a doubleclick:




&#60;script type=&#34;text/javascript&#34;&#62;
&#160;
function kp() {
&#160;&#160;&#160;&#160;var rb = document.getElementsByName(&#039;rb&#039;);
&#160;&#160;&#160;&#160;for( var i=0; i &#60; rb.length; i++) {
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>We needed to set up a group of radio buttons so that when any of them is doubleclicked any selection in the group is removed. <span id="more-39"></span>. The following javascript snippet sets up the function <strong>kp()</strong> which removes all selections upon a doubleclick:<br />
<span style="float:left; margin-right: 2em; margin-top: 1em; margin-bottom: 1em;"><br />
<!--adsense#side_button--><br />
</span><br />
<code><br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
&nbsp;<br />
function kp() {<br />
&nbsp;&nbsp;&nbsp;&nbsp;var rb = document.getElementsByName(&#039;rb&#039;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;for( var i=0; i &lt; rb.length; i++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rb[i].checked = false;<br />
&nbsp;&nbsp;&nbsp;&nbsp;}<br />
}<br />
&nbsp;<br />
</code></p>
<p>And the corresponding html which calls <strong>kp()</strong>:<br />
<code><br />
&lt;input name=&quot;rb&quot; value=&quot;0&quot; type=&quot;radio&quot; ondblclick=&quot;kp()&quot;/&gt;No<br />
&lt;input name=&quot;rb&quot; value=&quot;1&quot; type=&quot;radio&quot; ondblclick=&quot;kp()&quot;/&gt;Yes<br />
&lt;input name=&quot;rb&quot; value=&quot;3&quot; type=&quot;radio&quot; ondblclick=&quot;kp()&quot;/&gt;Maybe<br />
&lt;input name=&quot;rb&quot; value=&quot;4&quot; type=&quot;radio&quot; ondblclick=&quot;kp()&quot;/&gt;Rather Not<br />
</code></p>
<p></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2006/03/09/doubleclick-a-radio-button-to-remove-selection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spreadsheet_Excel_Writer</title>
		<link>http://www.edna.narrabilis.com/2006/03/08/spreadsheet_excel_writer/</link>
		<comments>http://www.edna.narrabilis.com/2006/03/08/spreadsheet_excel_writer/#comments</comments>
		<pubDate>Wed, 08 Mar 2006 16:48:55 +0000</pubDate>
		<dc:creator>ednawig</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.edna.narrabilis.com/2006/03/08/spreadsheet_excel_writer/</guid>
		<description><![CDATA[The pear package Spreadsheet_Excel_Writer rocks. I include a file similar to excel.inc file in my scripts, and then send data as needed to the spreadshhet. 
Assume the data is organized in an array $data like this:
$data = array(0=&#62;array(&#34;f0&#34;=&#62;&#34;v00&#34;, &#34;f1&#34;=&#62;&#34;v01&#34;,&#46;..&#34;fn&#34;=&#62;&#34;v0n&#34;),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1=&#62;array(&#34;f0&#34;=&#62;&#34;v10&#34;, &#34;f1&#34;=&#62;&#34;v11&#34;,&#46;..&#34;fn&#34;=&#62;&#34;v1n&#34;),
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#46;....
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;n=&#62;array(&#34;f0&#34;=&#62;&#34;vn0&#34;, &#34;f1&#34;=&#62;&#34;vn1&#34;,&#46;..&#34;fn&#34;=&#62;&#34;vnn&#34;)
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; );

and we are interested in the fields f0, f1, f2 only. The [...]]]></description>
			<content:encoded><![CDATA[<p>The pear package <a href="http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.php">Spreadsheet_Excel_Writer</a> rocks. I include a file similar to <a href="http://www.edna.narrabilis.com/wp-content/uploads/2006/03/excel.html">excel.inc</a> file in my scripts, and then send data as needed to the spreadshhet. <span id="more-35"></span></p>
<p>Assume the data is organized in an array <code>$data</code> like this:<br />
<code>$data = array(0=&gt;array(&quot;f0&quot;=&gt;&quot;v00&quot;, &quot;f1&quot;=&gt;&quot;v01&quot;,&#46;..&quot;fn&quot;=&gt;&quot;v0n&quot;),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1=&gt;array(&quot;f0&quot;=&gt;&quot;v10&quot;, &quot;f1&quot;=&gt;&quot;v11&quot;,&#46;..&quot;fn&quot;=&gt;&quot;v1n&quot;),<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#46;....<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;n=&gt;array(&quot;f0&quot;=&gt;&quot;vn0&quot;, &quot;f1&quot;=&gt;&quot;vn1&quot;,&#46;..&quot;fn&quot;=&gt;&quot;vnn&quot;)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br />
</code></p>
<p>and we are interested in the fields <code>f0, f1, f2</code> only. The headers for these fields should be &#8220;Field One&#8221;, &#8220;Field Two&#8221;, &#8220;Field Three&#8221;. This is easily achieved by this snippet:<br />
<span style="float:left; margin-right: 2em; margin-top: 1em; margin-bottom: 1em;"><br />
<!--adsense#side_button--><br />
</span><br />
<code><br />
&nbsp;&nbsp; simple_header(array(&quot;Field One&quot;, &quot;Field Two&quot;, &quot;Field Three&quot;));<br />
&nbsp;&nbsp; $lookat = array(&quot;f0&quot;,&quot;f1&quot;,&quot;f2&quot;);<br />
&nbsp;&nbsp; for($j=0; $j&lt;count($data); $j++) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; simple_row($data, $lookat, $j+1);<br />
&nbsp;&nbsp; }<br />
</code></p>
<p>And don&#8217;t forget a <code>$xls-&gt;close();</code> after all the data has been output!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edna.narrabilis.com/2006/03/08/spreadsheet_excel_writer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
