<?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>John Wells &#187; Programming</title>
	<atom:link href="http://www.jfwhome.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jfwhome.com</link>
	<description>Knowledge Management and Social Web App Guru</description>
	<lastBuildDate>Mon, 04 Jan 2016 17:26:35 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9</generator>
	<item>
		<title>jsPlumb anchors jump to their correct positions only after starting to draw</title>
		<link>http://www.jfwhome.com/2012/11/21/jsplumb-anchors-jump-to-their-correct-positions-only-after-starting-to-draw/</link>
		<comments>http://www.jfwhome.com/2012/11/21/jsplumb-anchors-jump-to-their-correct-positions-only-after-starting-to-draw/#comments</comments>
		<pubDate>Wed, 21 Nov 2012 09:35:10 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[UI scripting]]></category>

		<guid isPermaLink="false">http://www.jfwhome.com/?p=198</guid>
		<description><![CDATA[This foxed me for a while. I was setting up a connector-based UI using the excellent jsPlumb. In jsPlumb, you declare elements to hold your endpoints, and then the endpoints are painted onto your elements according to anchors you specify. For example, you could set your anchor to the middle of the left side of&#8230;]]></description>
				<content:encoded><![CDATA[<p>This foxed me for a while. I was setting up a connector-based UI using the excellent jsPlumb. </p>
<p>In jsPlumb, you declare elements to hold your endpoints, and then the endpoints are painted onto your elements according to anchors you specify. For example, you could set your anchor to the middle of the left side of your element, with the connector coming our of it towards the left.</p>
<p>This is all quite simple, but I spent hours trying to get it to work &#8212; whatever happened, the endpoints appeared in the wrong place. The frustrating part was that they would jump into the correct place after I started to draw connectors. So jsPlumb clearly couldn&#8217;t figure out the dimensions of the element when it was declared &#8212; only after I had started drawing.</p>
<p>It turns out that the problem was with jQuery UI tabs &#8212; the endpoints were inside a tab. Despite the tab being the default one and visible on page load, it was preventing jsPlumb from positioning endpoints correctly.</p>
<p>Once I had figured out that tabs were the culprit, the solution was really simple: Just call <code>jsPlumb.repaintEverything();</code> whenever the tab is &#8216;shown&#8217;. This way all positions can be re-calculated when the page is set up and all elements are visible and in their final positions. I put the call to repaintEverything in the tabs&#8217; show() event.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfwhome.com/2012/11/21/jsplumb-anchors-jump-to-their-correct-positions-only-after-starting-to-draw/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Looking for a great Linux PHP editor? Try Geany.</title>
		<link>http://www.jfwhome.com/2009/12/09/looking-for-a-great-linux-php-editor-try-geany/</link>
		<comments>http://www.jfwhome.com/2009/12/09/looking-for-a-great-linux-php-editor-try-geany/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 14:53:15 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.jfwhome.com/?p=116</guid>
		<description><![CDATA[I&#8217;ve never been one of the vi or emacs brigade &#8212; when editing code (mainly PHP and Python), I&#8217;ve always found it easiest using a lightweight editor (together with a local server). Since moving to Linux full-time several years ago, I&#8217;ve been on the look-out for an editor I really liked. On Windows, I liked&#8230;]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve never been one of the vi or emacs brigade &#8212; when editing code (mainly PHP and Python), I&#8217;ve always found it easiest using a lightweight editor (together with a local server).<br />
<span id="more-116"></span><br />
Since moving to Linux full-time several years ago, I&#8217;ve been on the look-out for an editor I really liked. On Windows, I liked Notepad++ &#8212; it did everything I needed with panache, and never got in the way.</p>
<p>On Ubuntu, I&#8217;ve stuck with gedit, with several plugins, including the <a href="http://www.micahcarrick.com/11-14-2007/gedit-symbol-browser-plugin.html">Symbol Browser</a> from Micah Carrick. I tried, at various times, jEdit, gPhpEdit, and even Eclipse &#8212; but they all just &#8216;got in my way&#8217; too much. gPhpEdit came close, but I found the function list wasn&#8217;t always accurate.</p>
<p>However, three things prompted me to look elsewhere again: First, it was choking on some sql dumps I was editing; Second, the symbol browser stopped working in Karmic; and Third, I still hate the shortcuts. I still prefer ctrl-Y for &#8220;redo&#8221; rather than &#8220;ctrl-shift-Z&#8221;, and I really, really need a shortcut (ctrl-D) for &#8220;duplicate this line&#8221;.</p>
<p>So, I just came across <a href="http://www.geany.org/">Geany</a> &#8212; it&#8217;s great. It&#8217;s fast, configurable, stable, has a great symbol browser, has the shortcuts just right, and doesn&#8217;t get in my way. </p>
<p><a href="http://www.jfwhome.com/2009/12/09/looking-for-a-great-linux-php-editor-try-geany/geany/" rel="attachment wp-att-117"><img src="http://www.jfwhome.com/wp-content/uploads/2009/12/geany.jpg" alt="Geany" title="Geany" width="400" height="224" class="alignnone size-full wp-image-117" /></a></p>
<p>It seems that Geany&#8217;s been around for a while &#8212; and is even part of the standard image on some lightweight linux distros. But this is the first time I&#8217;ve come across it &#8212; and I&#8217;m glad I did.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfwhome.com/2009/12/09/looking-for-a-great-linux-php-editor-try-geany/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Querying subfolders in SharePoint lists using SPAPI and GetListItems()</title>
		<link>http://www.jfwhome.com/2009/11/11/querying-subfolders-in-sharepoint-lists-using-spapi-and-getlistitems/</link>
		<comments>http://www.jfwhome.com/2009/11/11/querying-subfolders-in-sharepoint-lists-using-spapi-and-getlistitems/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 03:20:30 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.jfwhome.com/?p=61</guid>
		<description><![CDATA[This took a while to figure out. I&#8217;ve been trying to query the SharePoint lists service using getListItems(). Getting something from inside one folder is easy &#8212; you just set the queryOptions parameter to be &#60;QueryOptions&#62;&#60;Folder&#62;folderName&#60;/Folder&#62;&#60;/QueryOptions&#62;. This works and returns items fron within that folder. But what about subfolders? One would expect it to be&#8230;]]></description>
				<content:encoded><![CDATA[<p>This took a while to figure out. I&#8217;ve been trying to query the SharePoint lists service using getListItems(). </p>
<p>Getting something from inside one folder is easy &#8212; you just set the queryOptions parameter to be <code>&lt;QueryOptions&gt;&lt;Folder&gt;folderName&lt;/Folder&gt;&lt;/QueryOptions&gt;</code>. </p>
<p>This works and returns items fron within that folder. But what about subfolders? </p>
<p><span id="more-61"></span></p>
<p>One would expect it to be simple &#8212; but it is not, replacing folderName with <code>folderName\subFolder</code> does not work &#8212; it still returns items from within folderName.</p>
<p>The solution is simple but non-obvious. For sub-folders, you have to include the name of the list as the first path element &#8212; so the query becomes <code>&lt;QueryOptions&gt;&lt;Folder&gt;listName\folderName\subFolder&lt;/Folder&gt;&lt;/QueryOptions&gt;</code></p>
<p>This doesn&#8217;t seem to be covered in any documentation, and is non-obvious, inconsistent behaviour. It resulted in a lot of wasted time for me. Unsurprising really for the over-complex, proprietary, non-standard mess that is SharePoint.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfwhome.com/2009/11/11/querying-subfolders-in-sharepoint-lists-using-spapi-and-getlistitems/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simple dynamic ASP includes</title>
		<link>http://www.jfwhome.com/2009/06/19/simple-dynamic-asp-includes/</link>
		<comments>http://www.jfwhome.com/2009/06/19/simple-dynamic-asp-includes/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 14:10:21 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP Classic]]></category>
		<category><![CDATA[Solutions]]></category>

		<guid isPermaLink="false">http://www.jfwhome.com/?p=7</guid>
		<description><![CDATA[I always end up never quite believing it when, once again, it dawns on me that I can&#8217;t complete a project the way I visualise due to ASP Classic&#8217;s lack of support for dynamic includes. This time, I was creating a CMS-like site, which included mixed HTML/ASP files automatically. I tried pretty much every other&#8230;]]></description>
				<content:encoded><![CDATA[<p>I always end up never quite believing it when, once again, it dawns on me that I can&#8217;t complete a project the way I visualise due to ASP Classic&#8217;s lack of support for dynamic includes. </p>
<p>This time, I was creating a CMS-like site, which included mixed HTML/ASP files automatically. I tried pretty much every other solution &#8212; including server.execute (no go &#8212; doesn&#8217;t preserve variables/functions),  and other examples of using ASP&#8217;s execute() command to parse files (didn&#8217;t work for mixed HTML/ASP).</p>
<p>So, the only thing left was to write my own. It&#8217;s fairly simple, and due to ASP/VBScript&#8217;s horribly limited feature set, very low-level. It steps through a file one character at a time, and decides if it is in &#8220;HTML mode&#8221; or &#8220;ASP mode&#8221; at an given time, and then uses this staus to convert the file into a set of executable lines.</p>
<p>It should handle most things correctly, with the exception of defines, and <code>&lt;!--#</code> -style directives. It handles short ASP write tags (<code>&lt;%= %&gt;</code>) just fine. Variable scope is preserved inside the include file, and variables/functions set inside the include file continue to exist outside it after it is included &#8212; in other words, just as they should.</p>
<p>To use it, simply include the file, and use it just as you would in a sane language:</p>
<p><code>include("relative_path_to_local_file.asp")</code></p>
<p>The function returns false if the file doesn&#8217;t exist, or true otherwise.</p>
<p>If you fix any bugs in this, please let me have them.</p>
<p>Download it here: <a href="http://www.jfwhome.com/wp-content/uploads/2009/06/asp-simple-include.zip">ASP Dynamic Includes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfwhome.com/2009/06/19/simple-dynamic-asp-includes/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
