<?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>PHP, Web and IT stuff &#187; Miscellaneous</title>
	<atom:link href="http://www.webdigi.co.uk/blog/category/miscellaneous/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdigi.co.uk/blog</link>
	<description>Little words of wisdom</description>
	<lastBuildDate>Tue, 15 Feb 2011 14:22:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Retain leading zero in CSV</title>
		<link>http://www.webdigi.co.uk/blog/2010/handling-leading-zero-in-csv/</link>
		<comments>http://www.webdigi.co.uk/blog/2010/handling-leading-zero-in-csv/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 11:22:09 +0000</pubDate>
		<dc:creator>php-manual</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=764</guid>
		<description><![CDATA[Most web applications at some point will have some sort of an export data feature to get data out of the database in some csv or excel format. CSV is probably the simplest to generate on the fly from PHP and other server side scripting languages. However, I had a particular issue where leading zeros [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_770" class="wp-caption aligncenter" style="width: 370px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/09/Leading_Zeros_CSV.png" target="_blank"><img class="size-medium wp-image-770  " title="Leading Zeros in CSV shown in Excel" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/09/Leading_Zeros_CSV-300x91.png" alt="Leading Zeros in Excel with CSV" width="360" height="109" /></a><p class="wp-caption-text">Leading Zeros shown in Excel when = is used (Row 3)</p></div>
<p>Most web applications at some point will have some sort of an export data feature to get data out of the database in some csv or excel format. CSV is probably the simplest to generate on the fly from PHP and other server side scripting languages. However, I had a particular issue where leading zeros were just not displaying when the csv file was opened with Excel. Look at the example csv below where when opened in Excel will not show leading zeros.</p>
<pre class="brush: jscript; title: ; notranslate">
&quot;Comment&quot;,&quot;Number&quot;,&quot;Zip&quot;
&quot;Leading Zeros will not be displayed&quot;,&quot;0003833&quot;,&quot;0596&quot;
</pre>
<p><span style="font-size: 13.3333px;">The best solution to work around this is just to add an = in front of the column to avoid Excel from formatting the column when displaying numeric value. So below works fine.</span></p>
<pre class="brush: jscript; title: ; notranslate">
&quot;Comment&quot;,&quot;Number&quot;,&quot;Zip&quot;
&quot;Leading Zeros shown in Excel&quot;,=&quot;0003833&quot;,=&quot;0596&quot;
</pre>
<p style="text-align: left;">Hope this simple trick helps you avoid Excel eating up leading zeros in csv! Any other CSV related suggestions and comments are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2010/handling-leading-zero-in-csv/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Hello World! &#8211; Adobe Air on Ubuntu and Windows</title>
		<link>http://www.webdigi.co.uk/blog/2009/adobe_air_hello_world_on_ubuntu_and_windows/</link>
		<comments>http://www.webdigi.co.uk/blog/2009/adobe_air_hello_world_on_ubuntu_and_windows/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 22:17:33 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[adobe air]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=175</guid>
		<description><![CDATA[This article is to help fellow web developers get started with working on Adobe AIR! Using Adobe AIR, you will be able to create desktop applications which are cross-operating system using just HTML, JS and a bit of XML. Adobe Air works great on Windows, Linux, Mac and hopefully a lot of future operating systems [...]]]></description>
			<content:encoded><![CDATA[<p>This article is to help fellow web developers get started with working on Adobe AIR! Using Adobe AIR, you will be able to create<strong> desktop applications</strong> which are cross-operating system using just HTML, JS and a bit of XML.</p>
<p>Adobe Air works great on Windows, Linux, Mac and hopefully a lot of future operating systems and mobile devices. If you get an application working, it should work and display exactly as it does across all the other operating systems as all AIR installations use WebKit. This article will give you an insight into how I got it working on Windows and Linux. We need Abobe AIR SDK to develop and build AIR applications. You can get Adobe AIR SDK from this link <a rel="nofollow" href="http://adobe.com/go/getairsdk" target="_self">here</a>.</p>
<p><strong>Setting up AIR SDK on Ubuntu</strong><br />
1) Get Adobe AIR SDK from http://adobe.com/go/getairsdk (Choose Linux)<br />
2) Extract contents of the file into a location that you prefer<br />
3) Pick the adl and adt files and place them in your bin directory on your machine OR set a path to the bin folder so that these files are accessible<br />
4) Once you have it all setup, you should be able to run adl on your terminal and get a message back instead of the standard &#8220;command not found&#8221;<br />
5) You will have to save both of the files (AIRHello.xml and AIRHello.html into a folder)<br />
6) On the terminal, go into the folder where the files are saved and run &#8220;adl AIRHello.xml&#8221; and that&#8217;s it you</p>
<p><strong>Setting up AIR SDK on Windows</strong><br />
1) Get Adobe AIR SDK from http://adobe.com/go/getairsdk (Choose Windows)<br />
2) Extract contents of the file into a location that you prefer<br />
3) Go to Start &gt; My Computer (Right click Properties) &gt; Advanced Tab &gt; Environment Variables &gt; Path &gt; Edit and add the path to your bin folder<br />
4) Once you have it all setup you should be able to run adl on your command line and get a message back instead of the standard &#8220;command not found&#8221;<br />
5) Make sure that on the command line if you type &#8220;path&#8221; you get to see the new entry.<br />
6) You will have to save both of the files (AIRHello.xml and AIRHello.html into any folder)<br />
6) On the command line browse to the folder where files are saved and run &#8220;adl AIRHello.xml&#8221; and that&#8217;s it!</p>
<p><strong>AIRHello.xml</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;application xmlns=&quot;http://ns.adobe.com/air/application/1.0&quot;&gt;
&lt;id&gt;uk.co.webdigi.AIRHello&lt;/id&gt;
&lt;filename&gt;AIRHello&lt;/filename&gt;
&lt;name&gt;Hello World&lt;/name&gt;
&lt;description&gt;This is a sample Adobe AIR application.&lt;/description&gt;
&lt;version&gt;1.0&lt;/version&gt;
&lt;initialWindow&gt;
&lt;content&gt;AIRHello.html&lt;/content&gt;
&lt;title&gt;Hello by Webdigi&lt;/title&gt;
&lt;systemChrome&gt;standard&lt;/systemChrome&gt;
&lt;transparent&gt;false&lt;/transparent&gt;
&lt;visible&gt;true&lt;/visible&gt;
&lt;minimizable&gt;true&lt;/minimizable&gt;
&lt;maximizable&gt;true&lt;/maximizable&gt;
&lt;resizable&gt;true&lt;/resizable&gt;
&lt;width&gt;500&lt;/width&gt;
&lt;height&gt;500&lt;/height&gt;
&lt;x&gt;150&lt;/x&gt;
&lt;y&gt;150&lt;/y&gt;
&lt;minSize&gt;300 300&lt;/minSize&gt;
&lt;maxSize&gt;800 800&lt;/maxSize&gt;
&lt;/initialWindow&gt;
&lt;/application&gt;
</pre>
<p><strong>AIRHello.html</strong></p>
<pre class="brush: xml; title: ; notranslate">

AIRHello
&lt;div&gt;
&lt;h2&gt;Hello World&lt;/h2&gt;
&lt;/div&gt;
</pre>
<p>This should get you started on working with Adobe AIR! You can easily create AIR applications using just HTML, Javascript and XML, all tools that web developers regularly use. You can do more advanced stuff like system tray alerts, drag and drop, sounds, file access and many more stuff that you can&#8217;t do on a traditional web browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2009/adobe_air_hello_world_on_ubuntu_and_windows/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

