<?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>RedCoupe</title> <atom:link href="http://www.redcoupe.co.uk/feed/" rel="self" type="application/rss+xml" /><link>http://www.redcoupe.co.uk</link> <description>My various ramblings</description> <lastBuildDate>Thu, 21 Jul 2011 10:23:19 +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>Order by date when stored as a nvarchar</title><link>http://www.redcoupe.co.uk/2011/07/21/order-by-date-when-stored-as-a-nvarchar/</link> <comments>http://www.redcoupe.co.uk/2011/07/21/order-by-date-when-stored-as-a-nvarchar/#comments</comments> <pubDate>Thu, 21 Jul 2011 10:23:19 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[Web design / development]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=1167</guid> <description><![CDATA[Just had a MS SQL Server problem where as the title suggests, I wanted to order a query by a date column to show the most recent entry at the top, but it wasn&#8217;t working because the date column was stored as a nvarchar instead of a datetime. I tried various things like CONVERT&#8230;. and [...]]]></description> <content:encoded><![CDATA[<p>Just had a MS SQL Server problem where as the title suggests, I wanted to order a query by a date column to show the most recent entry at the top, but it wasn&#8217;t working because the date column was stored as a nvarchar instead of a datetime.</p><p>I tried various things like CONVERT&#8230;. and CAST&#8230;AS datetime, but for whatever reason I could not get this to work.</p><p>I got round this by doing some string concatenation:</p><p><code>SELECT * FROM tbl_articles<br
/> WHERE visible = 1<br
/> ORDER BY RIGHT(dateval,4)+SUBSTRING(dateval, 4, 2)+LEFT(dateval,2) ASC</code></p><p>The date was stored in the table as text like 22/10/2011, the above concatenating turns it into 20111022 which can easily be sorted in the proper order.</p><p>I know this is more than likely not the best way of doing it and should have persevered with the casts and converts but it works fine for the minimal amount of data I have in that table. No doubt I&#8217;ll have to revisit this if the number of records significantly increases.</p><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-11680"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2011/07/21/order-by-date-when-stored-as-a-nvarchar/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Modified styles in WordPress</title><link>http://www.redcoupe.co.uk/2011/07/14/modified-styles-in-wordpress/</link> <comments>http://www.redcoupe.co.uk/2011/07/14/modified-styles-in-wordpress/#comments</comments> <pubDate>Thu, 14 Jul 2011 13:25:26 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[Web design / development]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=1163</guid> <description><![CDATA[I have another site produced with WordPress and it uses a modified version of the Twenty Eleven theme. The trouble was that whenever I applied an update to the theme, it obviously overwrote my modified style.css. I suppose if I wasn&#8217;t lazy I could have copied the theme to a new folder and simply used [...]]]></description> <content:encoded><![CDATA[<p>I have another site produced with WordPress and it uses a modified version of the <a
title="Twenty Evelen theme" href="http://wordpress.org/extend/themes/twentyeleven">Twenty Eleven theme</a>.</p><p>The trouble was that whenever I applied an update to the theme, it obviously overwrote my modified style.css. I suppose if I wasn&#8217;t lazy I could have copied the theme to a new folder and simply used the copied theme. Although I do like getting updates including any improvement tweaks etc.</p><p>To get round this I found a great plugin called <a
title="Style Press" href="http://wordpress.org/extend/plugins/style-press/">Style Press</a> which was made by <a
title="grandslambert" href="http://profiles.wordpress.org/users/grandslambert/">grandslambert</a> who has also produced some other handy plugins. So I installed it, added my custom css, reverted the style.css back to the original version, and it worked perfectly. So in future whenever I apply a new update to this theme, unless class or id names change, the site will always look the same because the extra bit of css is always added at the end of all the other style includes in the html.</p><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-11640"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2011/07/14/modified-styles-in-wordpress/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Typing umlauts on an English language keyboard</title><link>http://www.redcoupe.co.uk/2011/06/30/typing-umlauts-on-an-english-language-keyboard/</link> <comments>http://www.redcoupe.co.uk/2011/06/30/typing-umlauts-on-an-english-language-keyboard/#comments</comments> <pubDate>Thu, 30 Jun 2011 09:58:23 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[Web design / development]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=1159</guid> <description><![CDATA[I&#8217;ve had reason to write a title in German that contains umlauts and apart from copying and pasting, I couldnt find a way to do this via my keyboard. By the way I&#8217;m using Windows XP. I know I can use the &#8220;Character Map&#8221; application under Start&#62;All Programs&#62;Accessories&#62;System Tools&#62; I found the ü symbol and [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve had reason to write a title in German that contains umlauts and apart from copying and pasting, I couldnt find a way to do this via my keyboard. By the way I&#8217;m using Windows XP.</p><p>I know I can use the &#8220;Character Map&#8221; application under Start&gt;All Programs&gt;Accessories&gt;System Tools&gt;</p><p>I found the ü symbol and it said the keystroke was Alt+0252. Well I tried this using the number keys along the top of my keyboard and it didn&#8217;t work. So I ended up just selecting what I needed and copying it etc. Since then I found out that if I took numlock off and used that number keypad it works fine.</p><p>Aparently on the Mac if you press Alt+u and then typing the following letter; a, u, or o. When the letter is pressed it will display the unlauts over the top as they should be.</p><p>Here&#8217;s a table of ALT codes for letters with accents:</p><table
border="1"><tbody><tr><th
colspan="3">Uppercase</th><th
colspan="3">Lowercase</th></tr><tr><th>Alt Codes</th><th>Symbol</th><th>Description</th><th>Alt Codes</th><th>Symbol</th><th>Description</th></tr><tr><td>Alt 0192</td><td>À</td><td>A grave</td><td>Alt 0224</td><td>à</td><td>a grave</td></tr><tr><td>Alt 0193</td><td>Á</td><td>A acute</td><td>Alt 0225</td><td>á</td><td>a acute</td></tr><tr><td>Alt 0194</td><td>Â</td><td>A circumflex</td><td>Alt 0226</td><td>â</td><td>a circumflex</td></tr><tr><td>Alt 0195</td><td>Ã</td><td>A tilde</td><td>Alt 0227</td><td>ã</td><td>a tilde</td></tr><tr><td>Alt 0196</td><td>Ä</td><td>A umlaut</td><td>Alt 0228</td><td>ä</td><td>a umlaut</td></tr><tr><td>Alt 0199</td><td>Ç</td><td>C cedilla</td><td>Alt 0231</td><td>ç</td><td>c cedilla</td></tr><tr><td>Alt 0200</td><td>È</td><td>E grave</td><td>Alt 0232</td><td>è</td><td>e grave</td></tr><tr><td>Alt 0201</td><td>É</td><td>E acute</td><td>Alt 0233</td><td>é</td><td>e acute</td></tr><tr><td>Alt 0202</td><td>Ê</td><td>E circumflex</td><td>Alt 0234</td><td>ê</td><td>e circumflex</td></tr><tr><td>Alt 0203</td><td>Ë</td><td>E umlaut</td><td>Alt 0235</td><td>ë</td><td>e umlaut</td></tr><tr><td>Alt 0204</td><td>Ì</td><td>I grave</td><td>Alt 0236</td><td>ì</td><td>i grave</td></tr><tr><td>Alt 0205</td><td>Í</td><td>I acute</td><td>Alt 0237</td><td>í</td><td>i acute</td></tr><tr><td>Alt 0206</td><td>Î</td><td>I circumflex</td><td>Alt 0238</td><td>î</td><td>i circumflex</td></tr><tr><td>Alt 0207</td><td>Ï</td><td>I umlaut</td><td>Alt 0239</td><td>ï</td><td>i umlaut</td></tr><tr><td>Alt 165</td><td>Ñ</td><td>N tilde</td><td>Alt 164</td><td>ñ</td><td>n tilde</td></tr><tr><td>Alt 0210</td><td>Ò</td><td>O grave</td><td>Alt 0242</td><td>ò</td><td>o grave</td></tr><tr><td>Alt 0211</td><td>Ó</td><td>O acute</td><td>Alt 0243</td><td>ó</td><td>o acute</td></tr><tr><td>Alt 0212</td><td>Ô</td><td>O circumflex</td><td>Alt 0244</td><td>ô</td><td>o  circumflex</td></tr><tr><td>Alt 0213</td><td>Õ</td><td>O tilde</td><td>Alt 0245</td><td>õ</td><td>o tilde</td></tr><tr><td>Alt 0214</td><td>Ö</td><td>O umlaut</td><td>Alt 0246</td><td>ö</td><td>o umlaut</td></tr><tr><td>Alt 0138</td><td>Š</td><td>S caron</td><td>Alt 0154</td><td>š</td><td>s caron</td></tr><tr><td>Alt 0218</td><td>Ú</td><td>U acute</td><td>Alt 0249</td><td>ù</td><td>u grave</td></tr><tr><td>Alt 0219</td><td>Û</td><td>U circumflex</td><td>Alt 0250</td><td>ú</td><td>u acute</td></tr><tr><td>Alt 0220</td><td>Ü</td><td>U umlaut</td><td>Alt 0251</td><td>û</td><td>u circumflex</td></tr><tr><td>Alt 0217</td><td>Ù</td><td>U grave</td><td>Alt 0252</td><td>ü</td><td>u umlaut</td></tr><tr><td>Alt 0221</td><td>Ý</td><td>Y acute</td><td>Alt 0253</td><td>ý</td><td>y acute</td></tr><tr><td>Alt 0159</td><td>Ÿ</td><td>Y umlaut</td><td>Alt 0255</td><td>ÿ</td><td>y umlaut</td></tr><tr><td>Alt 0142</td><td>Ž</td><td>Z caron</td><td>Alt 0158</td><td>ž</td><td>z caron</td></tr></tbody></table><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-11600"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2011/06/30/typing-umlauts-on-an-english-language-keyboard/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Vi / Vim Shortcuts</title><link>http://www.redcoupe.co.uk/2011/06/15/vi-vim-shortcuts/</link> <comments>http://www.redcoupe.co.uk/2011/06/15/vi-vim-shortcuts/#comments</comments> <pubDate>Wed, 15 Jun 2011 14:32:37 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[Web design / development]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=1156</guid> <description><![CDATA[Im always forgetting the very useful vi shortcuts, so here&#8217;s a list of them: &#38;#710; = Control key If you see a 10, this can be replaced by any number Operation Keys Return to Command mode from Insert, overwrite or append mode Escape Enter Insert mode i Enter overwRite mode R Enter append mode a [...]]]></description> <content:encoded><![CDATA[<p>Im always forgetting the very useful vi shortcuts, so here&#8217;s a list of them:</p><p>&amp;#710; = Control key</p><p>If you see a <strong>10</strong>, this can be replaced by any number</p><table
border="1" cellspacing="5" cellpadding="5" summary="Table of vi shortcut commands"><tbody><tr><th>Operation</th><th>Keys</th></tr><tr><td>Return to Command mode from Insert, overwrite or append mode</td><td><strong>Escape</strong></td></tr><tr><td>Enter Insert mode</td><td><strong>i</strong></td></tr><tr><td>Enter overwRite mode</td><td><strong>R</strong></td></tr><tr><td>Enter append mode</td><td><strong>a</strong></td></tr><tr><td>Enter append mode at end of this line</td><td><strong>A</strong></td></tr><tr><td>Enter Insert mode on a new line after this</td><td><strong>o</strong></td></tr><tr><td>Enter Insert mode on a new line before this</td><td><strong>O</strong></td></tr><tr><td>Delete this word and enter Insert mode here</td><td><strong>cw</strong></td></tr><tr><td>Delete this line and enter Insert mode here</td><td><strong>cc</strong></td></tr><tr><td>Delete the next 10 lines and enter Insert mode here</td><td><strong>10cc</strong></td></tr><tr><td>Move cursor left one character</td><td><strong>left arrow or h</strong></td></tr><tr><td>Move cursor left e.g. 10 characters</td><td><strong>10h</strong></td></tr><tr><td>Move cursor down one line</td><td><strong>down arrow or j</strong></td></tr><tr><td>Move cursor down 10 lines</td><td><strong>10j</strong></td></tr><tr><td>Move cursor up one line</td><td><strong>up arrow or k</strong></td></tr><tr><td>Move cursor right one character</td><td><strong>right arrow or l</strong></td></tr><tr><td>Save this file and continue</td><td><strong>:w</strong></td></tr><tr><td>Save this file and exit</td><td><strong>:wq</strong></td></tr><tr><td>Abort without saving changes to this file</td><td><strong>:q!</strong></td></tr><tr><td>Quit (no changes made)</td><td><strong>:q</strong></td></tr><tr><td>Save as a new file &#8220;new-file&#8221;</td><td><strong>:w new-file</strong></td></tr><tr><td>Load the file &#8220;myfile&#8221; into vi</td><td><strong>:e myfile</strong></td></tr><tr><td>Delete the character under the cursor</td><td><strong>x or Del</strong></td></tr><tr><td>Delete the current word (inc. space)</td><td><strong>dw</strong></td></tr><tr><td>Delete the next 10 words</td><td><strong>10dw</strong></td></tr><tr><td>Delete the current line</td><td><strong>dd</strong></td></tr><tr><td>Delete the next 10 lines</td><td><strong>10dd</strong></td></tr><tr><td>Delete rest of this line, right of the cursor</td><td><strong>d$</strong></td></tr><tr><td>Yank the current line onto the clipboard</td><td><strong>yy</strong></td></tr><tr><td>Yank the current word onto the clipboard</td><td><strong>yw</strong></td></tr><tr><td>Paste the clipboard</td><td><strong>p</strong></td></tr><tr><td>Undo</td><td><strong>u</strong></td></tr><tr><td>Redo</td><td><strong>^r</strong></td></tr><tr><td>Jump to the bottom of the file</td><td><strong>G</strong></td></tr><tr><td>Jump to e.g. the tenth line of the file</td><td><strong>10G</strong></td></tr><tr><td>Jump to the top of the file</td><td><strong>gg</strong></td></tr><tr><td>Jump one page forward</td><td><strong>^f</strong></td></tr><tr><td>Jump half a page forward</td><td><strong>^u</strong></td></tr><tr><td>Jump one page back</td><td><strong>^b</strong></td></tr><tr><td>Jump half a page back</td><td><strong>^d</strong></td></tr><tr><td>Search for <strong>text</strong> from cursor</td><td><strong>/text</strong></td></tr><tr><td>Find next occurrence of <strong>text</strong></td><td><strong>n</strong></td></tr><tr><td>Find previous occurrence of <strong>text</strong></td><td><strong>N</strong></td></tr><tr><td>Start of next word</td><td><strong>w</strong></td></tr><tr><td>End of next word</td><td><strong>e</strong></td></tr><tr><td>Start of the tenth word forward</td><td><strong>10w</strong></td></tr><tr><td>Start of next sentence</td><td><strong>)</strong></td></tr><tr><td>Start of previous sentence</td><td><strong>(</strong></td></tr><tr><td>Start of line</td><td><strong>0</strong> (zero)</td></tr><tr><td>End of line</td><td><strong>$</strong></td></tr><tr><td>Top of screen</td><td><strong>H</strong></td></tr><tr><td>Bottom of screen</td><td><strong>L</strong></td></tr><tr><td>Middle of screen</td><td><strong>M</strong></td></tr></tbody></table><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-11570"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2011/06/15/vi-vim-shortcuts/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Welcome back PSN</title><link>http://www.redcoupe.co.uk/2011/06/09/welcome-back-psn/</link> <comments>http://www.redcoupe.co.uk/2011/06/09/welcome-back-psn/#comments</comments> <pubDate>Thu, 09 Jun 2011 12:36:01 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[PS3]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=1090</guid> <description><![CDATA[For the &#8216;Welcome Back&#8217; package I&#8217;ve gone for WipeOut HD (with Fury pack) and Infamous, for the PSP I&#8217;ll probably go for Little Big Planet and ModNation Racers. As a Playstation Plus subscriber I was pleased to be able to download Burnout Paradise as a freebie, nice one.]]></description> <content:encoded><![CDATA[<p>For the &#8216;Welcome Back&#8217; package I&#8217;ve gone for WipeOut HD (with Fury pack) and Infamous, for the PSP I&#8217;ll probably go for Little Big Planet and ModNation Racers. As a Playstation Plus subscriber I was pleased to be able to download Burnout Paradise as a freebie, nice one.</p><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-10910"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2011/06/09/welcome-back-psn/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Get dropdown list label value</title><link>http://www.redcoupe.co.uk/2011/06/09/get-dropdown-list-label-value/</link> <comments>http://www.redcoupe.co.uk/2011/06/09/get-dropdown-list-label-value/#comments</comments> <pubDate>Thu, 09 Jun 2011 08:49:03 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[Web design / development]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=668</guid> <description><![CDATA[I was working on a couple of web pages this morning to allow completion of a course booking form, user then submits to a thankyou page, confirmation emails are sent etc. The problem I faced was that only the course ID was being passed to the thankyou page so in the emails that are generated, [...]]]></description> <content:encoded><![CDATA[<p>I was working on a couple of web pages this morning to allow completion of a course booking form, user then submits to a thankyou page, confirmation emails are sent etc.</p><p>The problem I faced was that only the course ID was being passed to the thankyou page so in the emails that are generated, it displays Course Details: 7 , instead of Course Details: 12/12/2011 PHP Basics.</p><p>So my initial thought was to create a hidden field just before the end form tag together with some javascript that gets the relevant label value:</p><p><code>document.getElementById('coursedetails').value = document.getElementById('training_id')[document.getElementById('training_id').selectedIndex].innerHTML;</code></p><p>Then in the thankyou page I just got Request.Form(&#8220;coursedetails&#8221;), this is in ASP VBScript just in case you were wondering. Works like a charm.</pre><p>Since doing this is I should have done it a much easier way and not have to rely on JavaScript being enabled. I already had the value because I was already using it to display the dropdown list label. So the hidden field could have just contained the default value of the currently selected item.</p><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-6690"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2011/06/09/get-dropdown-list-label-value/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MS SQL Server &#8211; get second from last record</title><link>http://www.redcoupe.co.uk/2011/05/18/ms-sql-server-get-second-from-last-record/</link> <comments>http://www.redcoupe.co.uk/2011/05/18/ms-sql-server-get-second-from-last-record/#comments</comments> <pubDate>Wed, 18 May 2011 13:49:10 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[Web design / development]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=551</guid> <description><![CDATA[Using MS SQL Server, I&#8217;ve been trying to get the second from last record that had been created because I want to do some comparison code to display what has been changed. Anyway just form future reference here&#8217;s the SQL I used: SELECT TOP 1 * FROM dbo.tbl_MailList_Items WHERE item_id < (SELECT MAX(item_id) FROM dbo.tbl_MailList_Items) [...]]]></description> <content:encoded><![CDATA[<p>Using MS SQL Server, I&#8217;ve been trying to get the second from last record that had been created because I want to do some comparison code to display what has been changed.</p><p>Anyway just form future reference here&#8217;s the SQL I used:</p><p><code>SELECT TOP 1 *<br
/> FROM dbo.tbl_MailList_Items<br
/> WHERE item_id < (SELECT MAX(item_id) FROM dbo.tbl_MailList_Items)<br
/> ORDER BY item_id DESC</code></p><p>This works perfectly for my situation and doesnt rely on just subtracting 1 from the id column because my id column is not fully incremental due to records being deleted etc.</p><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-5520"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2011/05/18/ms-sql-server-get-second-from-last-record/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Killzone 3</title><link>http://www.redcoupe.co.uk/2011/03/15/killzone-3/</link> <comments>http://www.redcoupe.co.uk/2011/03/15/killzone-3/#comments</comments> <pubDate>Tue, 15 Mar 2011 18:25:35 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[PS3]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=1086</guid> <description><![CDATA[Well what can I say, I&#8217;m finding this game absolutely awesome. The graphics and sound are fantastic and both the single player campaign and online multiplayer are incredibly addictive. When I first played this I thought the controls seemed a bit kind of &#8216;sloppy&#8217; but having spent quite a few hours on it, I&#8217;ve got [...]]]></description> <content:encoded><![CDATA[<p>Well what can I say, I&#8217;m finding this game absolutely awesome. The graphics and sound are fantastic and both the single player campaign and online multiplayer are incredibly addictive.</p><p>When I first played this I thought the controls seemed a bit kind of &#8216;sloppy&#8217; but having spent quite a few hours on it, I&#8217;ve got used to it with no problems.</p><p>Big thumbs up for me, love it!</p><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-10870"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2011/03/15/killzone-3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Ubuntu subdomains on Apache2</title><link>http://www.redcoupe.co.uk/2010/09/21/ubuntu-subdomains-on-apache2/</link> <comments>http://www.redcoupe.co.uk/2010/09/21/ubuntu-subdomains-on-apache2/#comments</comments> <pubDate>Tue, 21 Sep 2010 11:37:21 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[Web design / development]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=237</guid> <description><![CDATA[From a standard Apache2 install I created a folder in /var/www/ called &#8216;testsite&#8217; (without the quotes). Go to the following folder: /etc/apache2/sites-available &#8230;and create a file called something suitable, for this purposes of this blog post I&#8217;ll just call my file testsite, It&#8217;s contents should be: DocumentRoot /var/www/testsite/ ServerName testsite.localhost ServerAlias testsite.myubuntubox Options Indexes FollowSymLinks [...]]]></description> <content:encoded><![CDATA[<p>From a standard Apache2 install I created a folder in /var/www/ called &#8216;testsite&#8217; (without the quotes).</p><p>Go to the following folder:</p><p><code>/etc/apache2/sites-available</code></p><p>&#8230;and create a file called something suitable, for this purposes of this blog post I&#8217;ll just call my file testsite, It&#8217;s contents should be:</p><p><code><VirtualHost
*:80><br
/> DocumentRoot /var/www/testsite/<br
/> ServerName testsite.localhost<br
/> ServerAlias testsite.myubuntubox<br
/> <Directory
/var/www/testsite/><br
/> Options Indexes FollowSymLinks MultiViews +Includes<br
/> AllowOverride None<br
/> Order allow,deny<br
/> allow from all<br
/> </Directory><br
/> </VirtualHost></code></p><p>Then run the following command:</p><p><code>sudo a2ensite testsite</code></p><p>Edit your /etc/hosts file and add the following lines:</p><p><code>127.0.0.1 testsite.localhost<br
/> 127.0.0.1 testsite.myubuntubox<br
/> 192.168.0.6 testsite.myubuntubox</code></p><p>Obviously the ip address 192.168.0.6 may be different depending on your network setup.</p><p>Restart Apache:</p><p><code>sudo /etc/init.d/apache2 reload</code></p><p>I also had to edit my c:\windows\system32\drivers\etc\hosts file on my other PC to make sure that when I visit http://testsite.myubuntubox/ it resolves correctly, so I now have the following:</p><p><code>127.0.0.1 localhost<br
/> 192.168.0.6 myubuntubox<br
/> 192.168.0.6 testsite.myubuntubox</code></p><p>That&#8217;s it, all working, now I can develop multiple websites locally using subdomains. Personally I would rather do it this way than putting websites into folders, seems to work better with Dreamweaver.</p><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-2380"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2010/09/21/ubuntu-subdomains-on-apache2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Change date/time format from MySQL</title><link>http://www.redcoupe.co.uk/2010/09/17/change-datetime-format-from-mysql/</link> <comments>http://www.redcoupe.co.uk/2010/09/17/change-datetime-format-from-mysql/#comments</comments> <pubDate>Fri, 17 Sep 2010 11:27:02 +0000</pubDate> <dc:creator>RedCoupe</dc:creator> <category><![CDATA[Web design / development]]></category> <guid
isPermaLink="false">http://www.redcoupe.co.uk/?p=225</guid> <description><![CDATA[Format was: 2010-09-17 12:09:01 But wanted to display like: 17-09-2010 12:09:01 &#60;?php echo date('d-m-Y H:m:s', strtotime($row_Recordset1['datetimeval'])); ?&#62; Related links: PHP: date &#8211; Manual PHP: strtotime &#8211; Manual]]></description> <content:encoded><![CDATA[<p>Format was: 2010-09-17 12:09:01</p><p>But wanted to display like: 17-09-2010 12:09:01</p><p><code>&lt;?php echo date('d-m-Y H:m:s', strtotime($row_Recordset1['datetimeval'])); ?&gt;</code></p><p><strong>Related links:</strong></p><ul><li><a
href="http://php.net/manual/en/function.strtotime.php">PHP: date &#8211; Manual</a></li><li><a
href="http://php.net/manual/en/function.strtotime.php">PHP: strtotime &#8211; Manual</a></li></ul><div
class="rw-right"><div
class="rw-ui-container rw-class-blog-post rw-urid-2260"></div></div>]]></content:encoded> <wfw:commentRss>http://www.redcoupe.co.uk/2010/09/17/change-datetime-format-from-mysql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 951/1043 objects using disk: basic

Served from: www.redcoupe.co.uk @ 2012-02-23 01:23:14 -->
