<?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>Adrian&#039;s Web Log &#187; code</title>
	<atom:link href="http://blog.inceweb.com/adrian/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.inceweb.com/adrian</link>
	<description>Adrian&#039;s second brain.</description>
	<lastBuildDate>Sun, 29 Jan 2012 21:50:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Editing Magento&#8217;s Invoice &amp; Despatch PDF Layouts</title>
		<link>http://blog.inceweb.com/adrian/2011/11/24/editing-magentos-invoice-despatch-pdf-layouts/</link>
		<comments>http://blog.inceweb.com/adrian/2011/11/24/editing-magentos-invoice-despatch-pdf-layouts/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 17:01:08 +0000</pubDate>
		<dc:creator>Adrian</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[credit]]></category>
		<category><![CDATA[despatch]]></category>
		<category><![CDATA[invoice]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[shipping]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/?p=364</guid>
		<description><![CDATA[Magento Invoice and Shipping (Despatch) PDF files are delivered with a reasonable layout, already suited toA4 printing, but benefit from some layout improvements, increasing font sizes, and lightening the greyscale boxes in the interests of readability. Take a copy of the relevant core files and place them in: /app/code/local/Mage/Sales/Model/Order/Pdf The relevant files are Invoice.php &#38; [...]]]></description>
			<content:encoded><![CDATA[<p>Magento Invoice and Shipping (Despatch) PDF files are delivered with a reasonable layout, already suited toA4 printing, but benefit from some layout improvements, increasing font sizes, and lightening the greyscale boxes in the interests of readability.<br />
Take a copy of the relevant core files and place them in:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>app<span style="color: #000000; font-weight: bold;">/</span>code<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>Mage<span style="color: #000000; font-weight: bold;">/</span>Sales<span style="color: #000000; font-weight: bold;">/</span>Model<span style="color: #000000; font-weight: bold;">/</span>Order<span style="color: #000000; font-weight: bold;">/</span>Pdf</pre></div></div>

<p>The relevant files are Invoice.php &amp; Shipment.php, but Abstract.php contains functions common to both, and the subdirectory Items contains formatting for the line items of each document type.<br />
The following snippet can be used to format database values as currency values:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$formattedPrice</span> <span style="color: #339933;">=</span> Mage<span style="color: #339933;">::</span><span style="color: #004000;">helper</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'core'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>currency<span style="color: #009900;">&#40;</span><span style="color: #000088;">$Price</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2011/11/24/editing-magentos-invoice-despatch-pdf-layouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Magento 1.3 to 1.5 upgrade notes</title>
		<link>http://blog.inceweb.com/adrian/2011/04/07/magento-1-3-to-1-5-upgrade-notes/</link>
		<comments>http://blog.inceweb.com/adrian/2011/04/07/magento-1-3-to-1-5-upgrade-notes/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 15:06:06 +0000</pubDate>
		<dc:creator>Adrian</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[1.3]]></category>
		<category><![CDATA[1.5]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mage]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/?p=326</guid>
		<description><![CDATA[The upgrade to 1.5 has a number of &#8220;gotchas&#8221; so while I am debugging the process on the test / staging instance, here are a few notes. Basic process Empty some or all of the log tables as they are potentially huge and are not needed: TRUNCATE `log_customer`; TRUNCATE `log_quote`; TRUNCATE `log_summary`; TRUNCATE `log_url`; TRUNCATE [...]]]></description>
			<content:encoded><![CDATA[<p>The upgrade to 1.5 has a number of &#8220;gotchas&#8221; so while I am debugging the process on the test / staging instance, here are a few notes.</p>
<h3>Basic process</h3>
<p>Empty some or all of the log tables as they are potentially huge and are not needed:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #ff0000;">`log_customer`</span>;
<span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #ff0000;">`log_quote`</span>;
<span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #ff0000;">`log_summary`</span>;
<span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #ff0000;">`log_url`</span>;
<span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #ff0000;">`log_url_info`</span>;
<span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #ff0000;">`log_visitor`</span>;
<span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #ff0000;">`log_visitor_info`</span>;
<span style="color: #993333; font-weight: bold;">TRUNCATE</span> <span style="color: #ff0000;">`log_visitor_online`</span>;</pre></div></div>

<p>Backup the 1.3 instance using Magento&#8217;s built in backup.</p>
<p>Edit the resulting .sql file and uncomment the FOREIGN_KEY controls at the top and bottom of the file:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SET</span> @OLD_FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span>@@FOREIGN_KEY_CHECKS<span style="color: #66cc66;">,</span> FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span>;
<span style="color: #993333; font-weight: bold;">SET</span> FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span>@OLD_FOREIGN_KEY_CHECKS;</pre></div></div>

<p>If the domain or subdomain is changing, do a search &amp; replace e.g. replace www.myshop.com with test5.myshop.com</p>
<p>Create the new database instance, and execute the SQL from the previous step. Make sure it doesn&#8217;t time out, last table created is normally &#8220;wishlist_item&#8221;</p>
<p>Yoast Metarobots breaks product maintenance in Magento 1.4+, so remove relevant fields:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">`core_resource`</span> <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`core_resource`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`code`</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'metarobots_setup'</span>;
<span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> <span style="color: #ff0000;">`eav_attribute`</span> <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`eav_attribute`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`attribute_code`</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'meta_robots'</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> eav_entity_type <span style="color: #993333; font-weight: bold;">SET</span> additional_attribute_table<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'catalog/eav_attribute'</span><span style="color: #66cc66;">,</span>entity_attribute_collection<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'catalog/product_attribute_collection'</span> <span style="color: #993333; font-weight: bold;">WHERE</span> entity_type_id<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">4</span>;</pre></div></div>

<p>Now FTP the Magento downloader.php onto the target site, check file permissions and execute it with http://test5.myshop.com/downloader.php</p>
<p>Follow the setup process including specifying the correct database name, user and password.</p>
<p>Use the same encryption key from the original site &#8211; find it in /app/etc/local.xml</p>
<p>If there are problems with the setup not accepting the admin user / password combination, simply re-run the installer by pointing your web browser at http://test5.myshop.com</p>
<p>Remember that the original admin user already exists in the database export, so create a temporary one and delete it later.</p>
<h3>Fixing problems</h3>
<h4>Can&#8217;t access the admin site, gives 404 error</h4>
<p>The database import will have incorrectly sequenced the sites, so run the following:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SET</span> @OLD_FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span>@@FOREIGN_KEY_CHECKS<span style="color: #66cc66;">,</span> FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> core_website <span style="color: #993333; font-weight: bold;">SET</span> website_id<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> core_website<span style="color: #66cc66;">.</span>code<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;admin&quot;</span> <span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">1</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> core_store <span style="color: #993333; font-weight: bold;">SET</span> store_id<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> core_store<span style="color: #66cc66;">.</span>code<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;admin&quot;</span> <span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">1</span>;
<span style="color: #993333; font-weight: bold;">SET</span> FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span>@OLD_FOREIGN_KEY_CHECKS;</pre></div></div>

<h4>Admin site is &#8220;white&#8221; i.e. CSS not working and plain HTML is displayed</h4>
<p>Delete contents of /var/cache/</p>
<h4>&#8220;There are no products matching the selection&#8221; when browsing front end</h4>
<p>Wrong customer group ID for users that are no logged in. Execute the following SQL:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SET</span> @OLD_FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span>@@FOREIGN_KEY_CHECKS<span style="color: #66cc66;">,</span> FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">0</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> <span style="color: #ff0000;">`customer_group`</span> <span style="color: #993333; font-weight: bold;">SET</span> <span style="color: #ff0000;">`customer_group_id`</span> <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`customer_group_code`</span> <span style="color: #993333; font-weight: bold;">LIKE</span> <span style="color: #ff0000;">'NOT LOGGED IN'</span>;
<span style="color: #993333; font-weight: bold;">SET</span> FOREIGN_KEY_CHECKS<span style="color: #66cc66;">=</span>@OLD_FOREIGN_KEY_CHECKS;</pre></div></div>

<h4>No product images</h4>
<p>Check correct permissions and then copy the images directory structure from the source site eg:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>catalog<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>subdomains<span style="color: #000000; font-weight: bold;">/</span>test5<span style="color: #000000; font-weight: bold;">/</span>httpdocs<span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>catalog<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Now login to admin site and run a  re-index on everything, and update all of the caches.</p>
<h4>Error File does not exist: &#8230; media/catalog/product/no_selection</h4>
<p>Review the System Configuration and under Catalogue / Catalogue / Product Image Placeholders and add the missing placeholders. Add back in the watermarks too in General / Design / Product Image Watermarks. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2011/04/07/magento-1-3-to-1-5-upgrade-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Binary &#8211; ASCII conversion</title>
		<link>http://blog.inceweb.com/adrian/2011/03/23/binary-ascii-conversion/</link>
		<comments>http://blog.inceweb.com/adrian/2011/03/23/binary-ascii-conversion/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 21:56:27 +0000</pubDate>
		<dc:creator>Adrian</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[ascii]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/?p=323</guid>
		<description><![CDATA[This page has bidirectional binary &#8211; ASCII conversion. This is useful if you are following @cjsupercomputer.]]></description>
			<content:encoded><![CDATA[<p><a title="Binary ASCII conversion" href="http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/Binary_To_Text.asp">This page</a> has bidirectional binary &#8211; ASCII conversion. This is useful if you are following <a title="CJ Super Computer" href="http://twitter.com/#!/cjsupercomputer">@cjsupercomputer</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2011/03/23/binary-ascii-conversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copy or move Magento to another instance</title>
		<link>http://blog.inceweb.com/adrian/2010/01/30/copy-or-move-magento-to-another-instance/</link>
		<comments>http://blog.inceweb.com/adrian/2010/01/30/copy-or-move-magento-to-another-instance/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 22:52:25 +0000</pubDate>
		<dc:creator>Adrian</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[instance]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[move]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/?p=135</guid>
		<description><![CDATA[A quick how-to if you want to copy or move Magento to another database instance, e.g. to create a test site, or move test to live. (1) Backup Magento using the built in backup tool. Download and uncompress the resulting SQL script. If changing the server or domain, search and replace &#8220;old.mysite.com&#8221; with &#8220;new.yoursite.com&#8221; Execute [...]]]></description>
			<content:encoded><![CDATA[<p>A quick how-to if you want to copy or move Magento to another database instance, e.g. to create a test site, or move test to live.</p>
<p>(1) Backup Magento using the built in backup tool. Download and uncompress the resulting SQL script. If changing the server or domain, search and replace &#8220;old.mysite.com&#8221; with &#8220;new.yoursite.com&#8221; Execute it to populate the new database instance.</p>
<p>(2) Copy all Magento files with the exception of the contents of the var/ directory.</p>
<p>(3) Edit app/etc/local.xml on the target instance and change the database, user and password, but not the encryption key. Also edit downloader/pearlib/pear.ini to correct the absolute paths it contains; no reason why these shouldn&#8217;t be relative to the Magento root directory, e.g. &#8220;./downloader/pearlib&#8221;.</p>
<p>(4) Execute the following SQL to prevent those nasty &#8220;Integrity constraint violation: 1062 Duplicate entry&#8221; errors from the log files when adding to the basket:</p>
<blockquote><p>TRUNCATE `log_customer` ;<br />
TRUNCATE `log_quote` ;<br />
TRUNCATE `log_summary` ;<br />
TRUNCATE `log_url` ;<br />
TRUNCATE `log_url_info` ;<br />
TRUNCATE `log_visitor` ;<br />
TRUNCATE `log_visitor_info` ;<br />
TRUNCATE `log_visitor_online` ;</p></blockquote>
<p>Now tidy up permissions:</p>
<blockquote><p>
chmod o+w var var/.htaccess app/etc<br />
chmod -R o+w media</p></blockquote>
<p>That should be it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2010/01/30/copy-or-move-magento-to-another-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skype Supernode Registry Hack</title>
		<link>http://blog.inceweb.com/adrian/2008/06/06/skype-supernode-registry-hack/</link>
		<comments>http://blog.inceweb.com/adrian/2008/06/06/skype-supernode-registry-hack/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 10:27:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[supernode]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/?p=59</guid>
		<description><![CDATA[If you are running Skype v3 or later, there is a registry change (provided by Skype for Universities etc.) that reportedly prevents your PC becoming a supernode. I say reportedly, because whilst I have been a guinea pig for the last week I haven&#8217;t noticed being a supernode, but of course Skype may not have [...]]]></description>
			<content:encoded><![CDATA[<p>If you are running Skype v3 or later, there is a registry change (provided by Skype for <a title="Skype Security for Universities" href="http://www.skype.com/security/universities/">Universities</a> etc.) that reportedly prevents your PC becoming a supernode. I say reportedly, because whilst I have been a guinea pig for the last week I haven&#8217;t noticed being a supernode, but of course Skype may not have tried. If you aren&#8217;t running the latest version of Skype yet you should probably upgrade (Help, Check for updates), because later versions allow you to edit previous messages, and voice quality is improved.<br />
If you think that being a supernode may cause you problems, try editing the registry as shown in the code below. (WordPress security doesn&#8217;t allow this file to be uploaded). You will need to reboot your PC for it to take effect.<br />
This is the edit:<br />
<code><br />
Windows Registry Editor Version 5.00<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Skype]<br />
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Skype\Phone]<br />
"DisableSupernode"=dword:00000001<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2008/06/06/skype-supernode-registry-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sleep</title>
		<link>http://blog.inceweb.com/adrian/2007/05/14/sleep/</link>
		<comments>http://blog.inceweb.com/adrian/2007/05/14/sleep/#comments</comments>
		<pubDate>Mon, 14 May 2007 10:30:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[sleep]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/2007/05/14/sleep/</guid>
		<description><![CDATA[Here is some DOS / NT CMD Script code to sleep for n seconds: @echo off echo Sleeping for 5 seconds call :sleep 5 echo Done goto :EOF :sleep :: This subroutine sleeps for n seconds ping -n %1 127.0.0.1 &#62; NUL 2&#62;&#38;1 goto :EOF]]></description>
			<content:encoded><![CDATA[<p>Here is some DOS / NT CMD Script code to sleep for n seconds:<br />
<code>@echo off<br />
echo Sleeping for 5 seconds<br />
call :sleep 5<br />
echo Done<br />
goto :EOF<br />
:sleep<br />
:: This subroutine sleeps for n seconds<br />
ping -n %1 127.0.0.1 &gt; NUL 2&gt;&amp;1<br />
goto :EOF</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2007/05/14/sleep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ESC/POS control for customer display cursor</title>
		<link>http://blog.inceweb.com/adrian/2007/02/14/escpos-control-for-customer-display-cursor/</link>
		<comments>http://blog.inceweb.com/adrian/2007/02/14/escpos-control-for-customer-display-cursor/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 12:53:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[epos]]></category>
		<category><![CDATA[esc/pos]]></category>
		<category><![CDATA[todo]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/2007/02/14/escpos-control-for-customer-display-cursor/</guid>
		<description><![CDATA[OK, so Epson&#8217;s support proved to be useless &#8211; &#8220;isn&#8217;t there a DIP switch on the back&#8221; and &#8220;we don&#8217;t do programming here&#8221; seemed to be the best they can offer. Inspiration led me to lookup the ESC/POS sequences for cursor display &#8211; not DC2 &#38; DC4 as previously though, they use the ASCII US [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so Epson&#8217;s support proved to be useless &#8211; &#8220;isn&#8217;t there a DIP switch on the back&#8221; and &#8220;we don&#8217;t do programming here&#8221; seemed to be the best they can offer.</p>
<p>Inspiration led me to lookup the ESC/POS sequences for cursor display &#8211; not DC2 &amp; DC4 as previously though, they use the ASCII US (31 decimal) commands:</p>
<p><code>USC 3167n     select/cancel cursor display<br />
n=0,1 (48,49 decimal)<br />
</code></p>
<p>So, back to uedit and try to work out what difference 0, 1, (48 &amp; 49 decimal)Â  make to the thing&#8230;</p>
<p>15/02/2007: answer: None at all!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2007/02/14/escpos-control-for-customer-display-cursor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UTW performance fix</title>
		<link>http://blog.inceweb.com/adrian/2007/01/14/utw-performance-fix/</link>
		<comments>http://blog.inceweb.com/adrian/2007/01/14/utw-performance-fix/#comments</comments>
		<pubDate>Sun, 14 Jan 2007 20:37:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[done]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/2007/01/14/utw-performance-fix/</guid>
		<description><![CDATA[Aparently UTW suffers from an expensive query &#8211; this site has a fix: http://ocaoimh.ie/2006/09/27/simple-utw-performance-boost/]]></description>
			<content:encoded><![CDATA[<p>Aparently UTW suffers from an expensive query &#8211; this site has a fix:</p>
<p><a href="http://ocaoimh.ie/2006/09/27/simple-utw-performance-boost/" title="Holy Shmoly UTW fix">http://ocaoimh.ie/2006/09/27/simple-utw-performance-boost/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2007/01/14/utw-performance-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel code snippets for file, path and tab names in cells</title>
		<link>http://blog.inceweb.com/adrian/2007/01/11/excel-code-snippets/</link>
		<comments>http://blog.inceweb.com/adrian/2007/01/11/excel-code-snippets/#comments</comments>
		<pubDate>Thu, 11 Jan 2007 16:33:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[excel]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/2007/01/11/excel-code-snippets/</guid>
		<description><![CDATA[From xlDynamic.com File path, file and worksheet name: =CELL("filename",A1) File path only: =LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1) File name only: =MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1, FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1) The sheet name: =MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255) Restriction: this technique only works for workbooks that have been saved at least once.]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.xldynamic.com/source/xld.xlFAQ0002.html" title="xlDynamic Excel FAQs">xlDynamic.com</a></p>
<p class="MsoNormal">File path, file and worksheet name:</p>
<p><code>=CELL("filename",A1)</code></p>
<p class="MsoNormal">File path only:</p>
<p><code>=LEFT(CELL("filename",A1),FIND("[",CELL("filename",A1),1)-1)</code></p>
<p class="MsoNormal">File name only:</p>
<p><code>=MID(CELL("filename",A1),FIND("[",CELL("filename",A1),1)+1,</code></p>
<p><code>FIND("]",CELL("filename",A1),1)-FIND("[",CELL("filename",A1),1)-1)</code></p>
<p class="MsoNormal">The sheet name:</p>
<p><code>=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)</code></p>
<p class="MsoNormal">Restriction: this technique only works for workbooks that have been saved at least once.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2007/01/11/excel-code-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expanding (folding) category lists</title>
		<link>http://blog.inceweb.com/adrian/2007/01/11/expanding-folding-category-lists/</link>
		<comments>http://blog.inceweb.com/adrian/2007/01/11/expanding-folding-category-lists/#comments</comments>
		<pubDate>Thu, 11 Jan 2007 10:23:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[todo]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.inceweb.com/adrian/2007/01/11/expanding-folding-category-lists/</guid>
		<description><![CDATA[I really must get around to implementing these plug-ins to stop clutter in the WordPress category and page lists. See also here. Consider the following JavaScript: // Toggle Show/Hide function toggle(name) { if (document.getElementById(name).style.display == "block") { document.getElementById(name).style.display = "none"; } else { document.getElementById(name).style.display = "block"; } }]]></description>
			<content:encoded><![CDATA[<p>I really must get around to implementing these <a href="http://www.webspaceworks.com/resources/wordpress/31/" title="Foldable Plugins">plug-ins</a> to stop clutter in the WordPress category and page lists.</p>
<p>See also <a href="http://www.lesterchan.net/others/downloads.php" title="Lester Chan's Solution">here</a>.</p>
<p>Consider the following JavaScript:<br />
<code>// Toggle Show/Hide</p>
<p>function toggle(name) {</p>
<p>if (document.getElementById(name).style.display == "block") {</p>
<p>document.getElementById(name).style.display = "none";</p>
<p>} else {</p>
<p>document.getElementById(name).style.display = "block";</p>
<p>}</p>
<p>}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inceweb.com/adrian/2007/01/11/expanding-folding-category-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

