tag:blogger.com,1999:blog-30685978772984399252024-03-05T09:01:43.980+00:00Toby's Holistic Development AgencyHolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-3068597877298439925.post-67096649901272784492011-05-09T21:07:00.001+01:002011-05-09T21:07:39.734+01:00Slides for “The dark parts of Mono” from DDD Scotland<iframe src="http://r.office.microsoft.com/r/rlidPowerPointEmbed?p1=1&p2=1&p3=SD2712551CFCA7FD25!296&p4=" width="402" height="327" frameborder="0" scrolling="no"></iframe> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com1tag:blogger.com,1999:blog-3068597877298439925.post-74883295197198919382011-02-04T15:38:00.003+00:002011-02-05T12:46:27.771+00:00PowerShell; download, parse, extract<p>Wrote my first powershell script and it finally clicked how it all ties together, and why I should spend a bit more time learning it. Generally when I need to do something quick and dirty I’ll fire up VS and create a console project or write a *.vbs script. Not anymore got a bit of love now for powershell just need to do it to “get it”.</p> <p>Basically I wanted to download a webpage, parse it using a regex, then extract the named groups from the multiple matches, and finally output to a tab delimited text file. As I could not find a complete script that worked, I’m putting this one up, for others and for personal storage (as I’m likely to forget after the weekend).</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:e88528d0-c20d-4664-9688-d9f269a2bb3c" class="wlWriterEditableSmartContent"><pre style=" width: 984px; height: 147px;background-color:Silver;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;overflow: auto;"><span style="color: #800080;">$wc</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> New</span><span style="color: #000000;">-</span><span style="color: #000000;">Object System.Net.WebClient<br /></span><span style="color: #800080;">$wc</span><span style="color: #000000;">.Encoding </span><span style="color: #000000;">=</span><span style="color: #000000;"> [System.Text.Encoding]</span><span style="color: #000000;">::</span><span style="color: #000000;">UTF8<br /></span><span style="color: #800080;">$pagetext</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">$wc</span><span style="color: #000000;">.DownloadString(</span><span style="color: #800000;">"</span><span style="color: #800000;">http://www.cro.ie/ena/forms_s_se.aspx</span><span style="color: #800000;">"</span><span style="color: #000000;">)<br /></span><span style="color: #800080;">$matches</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">$pagetext</span><span style="color: #000000;"> </span><span style="color: #000000;">|</span><span style="color: #000000;"> select</span><span style="color: #000000;">-</span><span style="color: #000000;">string </span><span style="color: #000000;">-</span><span style="color: #000000;">pattern </span><span style="color: #800000;">"</span><span style="color: #800000;"><strong>(?<form>.*?)</strong>(?<desc>.*?)</p></span><span style="color: #800000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">-</span><span style="color: #000000;">allmatches </span><span style="color: #000000;">|</span><span style="color: #000000;"> </span><span style="color: #000000;">%</span><span style="color: #000000;">{</span><span style="color: #800080;">$_</span><span style="color: #000000;">.matches }<br /></span><span style="color: #800080;">$extractedtext</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">$matches</span><span style="color: #000000;"> </span><span style="color: #000000;">|</span><span style="color: #000000;"> </span><span style="color: #000000;">%</span><span style="color: #000000;">{ </span><span style="color: #800080;">$_</span><span style="color: #000000;">.groups['form'].value.trim() </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">`t</span><span style="color: #800000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800080;">$_</span><span style="color: #000000;">.groups['desc'].value.trim()}<br />add</span><span style="color: #000000;">-</span><span style="color: #000000;">content formtypes.txt </span><span style="color: #800080;">$extractedtext</span></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div>What I learnt:<div>There is no native Get-Url or Wget.<br /><div>% is an alias for ForEach-Object.</div><div>$_ is the object been passed in.</div><div>`t is tab and that ` is very hard to find as it is not ' . I can't remember ever using that key on a keyboard before.<br /><br /></div><div>Hope it helps and any changes let me know. </div></div>HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com2tag:blogger.com,1999:blog-3068597877298439925.post-20926684367325121632010-10-22T12:17:00.001+01:002010-10-22T12:17:44.515+01:00London .Net User Group: Open Mike Night<p>On Wednesday 20th October 2010 in organise an <a href="http://dnug.org.uk/" target="_blank">London .Net User Group</a> (<a href="http://dnug.org.uk/" target="_blank">LDNUG</a>) Open Mike Night. <br />Open Mike Night is a night to introduce new speakers to the community. Over the last year we have noticed not many new speakers coming through the ranks in LDNUG, this has been our own fault for not creating the arena for them to take to the stage.</p> <p>There was 5 talks 10-15 minutes long on any topic related to been a developer. They all did very well, I know it is not easy as I was there once, my first talk was also a LDNUG 10 minute talk. So I wish them well on their journey and hope to see them presenting longer talks at bigger events! </p> <p>Thanks you everyone for coming and making such an great night. I hope to see you at the next events and if you have any suggestions or questions please don’t hesitate to contact me. </p> <p><b>Speaker details:</b></p> <p><strong>Talk: "Three years of running a Tiny software company.. All my mistakes.."</strong> <br />Name: James Knowles <br />Email: <a href="mailto:james@unwindsoftware.com">james@unwindsoftware.com</a> <br />Twitter: <a href="http://twitter.com/unwindsoftware">http://twitter.com/unwindsoftware</a> <br />Linkedin: <a href="http://uk.linkedin.com/in/unwindsoftware">http://uk.linkedin.com/in/unwindsoftware</a> <br />Blog/website: <a href="http://blog.unwindsoftware.com/">http://blog.unwindsoftware.com/</a> <br />Slide/code links: <a href="http://www.unwindsoftware.com/presentations/Three-years-of-running-a-Tiny-software-company.pptx">http://www.unwindsoftware.com/presentations/Three-years-of-running-a-Tiny-software-company.pptx</a></p> <p><strong>Talk: "Introduction to Sass"</strong> <br />Name: Garry Shutler <br />Email: <a href="mailto:garry@robustsoftware.co.uk">garry@robustsoftware.co.uk</a> <br />Twitter: <a href="http://twitter.com/gshutler">http://twitter.com/gshutler</a> <br />Linkedin: <a href="http://uk.linkedin.com/pub/garry-shutler/13/896/a98">http://uk.linkedin.com/pub/garry-shutler/13/896/a98</a> <br />Blog/website: <a href="http://www.robustsoftware.co.uk/">http://www.robustsoftware.co.uk/</a> <br />Slides: <a href="http://bit.ly/ldnugsassslides">http://bit.ly/ldnugsassslides</a> <br />Images: <a href="http://bit.ly/ldnugsassimages">http://bit.ly/ldnugsassimages</a></p> <p><strong>Talk: "Pair programming, the good, the bad and the ugly"</strong> <br />Name: Sara Stephens <br />Email: <a href="mailto:sara@sarastephens.com">sara@sarastephens.com</a> <br />Twitter: <a href="http://twitter.com/developerdame">http://twitter.com/developerdame</a> <br />Linkedin: <a href="http://uk.linkedin.com/in/sarajstephens">http://uk.linkedin.com/in/sarajstephens</a> <br />Blog/website: <a href="http://www.developerdame.com/">http://www.developerdame.com/</a> <br />Slide/code links: watch the blog</p> <p><strong>Talk: "Pair programming, the good, the bad and the ugly"</strong> <br />Name: Rachel Laycock <br />Email: <a href="mailto:rachellaycock@googlemail.com">rachellaycock@googlemail.com</a> <br />Twitter: <a href="http://twitter.com/rachellaycock">http://twitter.com/rachellaycock</a> <br />Linkedin: <a href="http://uk.linkedin.com/in/rachellaycock">http://uk.linkedin.com/in/rachellaycock</a> <br />Blog/website: <a href="http://www.rachellaycock.com/">http://www.rachellaycock.com/</a> <br />Slide/code links: watch the blog</p> <p><strong>Talk: "HTML5 basics"</strong> <br />Name: Robin Minto <br />Email: <a href="mailto:robin@minto.co.uk">robin@minto.co.uk</a> <br />Twitter: <a href="http://twitter.com/robinem">http://twitter.com/robinem</a> <br />Linkedin: <a href="http://uk.linkedin.com/pub/robin-minto/22/496/799">http://uk.linkedin.com/pub/robin-minto/22/496/799</a> <br />Blog/website: <a href="http://robinminto.com/blog/">http://robinminto.com/blog/</a> <br />Slide/code links: <a href="http://robinminto.com/blog/2010/10/22/html5-basics-presentation/">http://robinminto.com/blog/2010/10/22/html5-basics-presentation/</a></p> <p><strong>Talk: "Cross platform mobile app development" </strong> <br />Name: Matt Lacey <br />Email: <a href="mailto:matt@mrlacey.co.uk">matt@mrlacey.co.uk</a> <br />Twitter: <a href="http://twitter.com/mrlacey">http://twitter.com/mrlacey</a> <br />Linkedin: <a href="http://uk.linkedin.com/in/mrlacey">http://uk.linkedin.com/in/mrlacey</a> <br />Blog/website: <a href="http://blog.mrlacey.co.uk/">http://blog.mrlacey.co.uk/</a> <br />Slide/code links: <a href="http://blog.mrlacey.co.uk/2010/10/phonegap-at-ldnug.htmlMain">http://blog.mrlacey.co.uk/2010/10/phonegap-at-ldnug.html <br /></a>Main code is from <a href="http://www.phonegap.com">www.phonegap.com</a> <br />WP7 version is currently at <a href="http://www.github.com/mrlacey/phonegap-wp7">www.github.com/mrlacey/phonegap-wp7</a></p> <p><b>Next LDNUG Events: <br /></b>Thursday 4<sup>th </sup>November 2010 <br /><b>Mads Torgersen</b> from Microsoft will talk about C# 5. We will probably be the first people in Europe to present on it. <br /><a href="http://skillsmatter.com/event/open-source-dot-net/c-sharp-5">http://skillsmatter.com/event/open-source-dot-net/c-sharp-5</a> </p> <p>Thursday 18<sup>th</sup> November 2010 <br /><b>Sarah Taraporewalla</b> (<a href="http://sarahtaraporewalla.com/">http://sarahtaraporewalla.com/</a>) on Integration Points <br />This is still been organised so watch the mailing list for details </p> <p><b>Other Events: <br /></b>Saturday 22<sup>nd</sup> 2010 <br /><b>DeveloperDeveloperDeveloper!</b> These FREE one day events build on the success of the previous DeveloperDeveloperDeveloper Days. As before, it is all about developers learning, sharing and interacting with each other in an informal and relaxed atmosphere. <br /><a href="http://developerdeveloperdeveloper.com/ddd8a/">http://developerdeveloperdeveloper.com/ddd8a/</a> </p> <p>Tuesday 26<sup>th</sup> October 2010 <br /><b>OpenSpaceBeers</b> are a one hour open-space, organized in a pub, with an open bar, for all the creative juices of the IT community to come and reflect on their own practices. <br /><a href="http://openspacebeers.eventbrite.com/">http://openspacebeers.eventbrite.com/</a> </p> <p>If you could vote for Michelle Flynn as a way for thanking her for venue and beer that would be awesome. <a href="http://www.computerweekly.com/Articles/2010/10/20/243307/Vote-in-the-Computer-Weekly-IT-Blog-Awards-2010.htm">http://www.computerweekly.com/Articles/2010/10/20/243307/Vote-in-the-Computer-Weekly-IT-Blog-Awards-2010.htm</a></p> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-27897632837362932242010-02-04T10:09:00.001+00:002010-02-04T10:20:33.720+00:00DDD8: Introduction to Mono slides<p>Here are my slides from my talk at <a href="http://developerdeveloperdeveloper.com/ddd8/" target="_blank">DDD8</a>. Just like to say thank you to all who came, I know it was due to the John Skeet room been full :). Thanks for all the great questions, I really enjoy giving the talk this time, as last year I was terrified and don’t remember talking.</p> <p><iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-2712551cfca7fd25.skydrive.live.com/embedicon.aspx/Projects/DDD8/IntroductionToMonoDDD8.pptx" frameborder="0" marginwidth="0" scrolling="no"></iframe></p> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-42898081153074661042009-07-17T16:47:00.001+01:002009-07-17T16:47:17.303+01:00Visual Studio Fonts and Colours<p>I got tired of the colours in VS2008 so asked on twitter if anyone has some themes. Got a good response of links to themes.</p> <p>Here are the main links I was sent:</p> <p>Scot Hanselman’s Blog <br /><a title="http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx" href="http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx">http://www.hanselman.com/blog/VisualStudioProgrammerThemesGallery.aspx</a> <br />Iain Holder’s Blog <br /><a title="http://tech-nous.blogspot.com/2008/10/visual-studio-2008-colour-schemes.html" href="http://tech-nous.blogspot.com/2008/10/visual-studio-2008-colour-schemes.html">http://tech-nous.blogspot.com/2008/10/visual-studio-2008-colour-schemes.html</a> <br />Is your IDE Hot or Not <br /><a title="http://idehotornot.ning.com/" href="http://idehotornot.ning.com/">http://idehotornot.ning.com/</a></p> <p>Mohamed Meligy <br /><a title="http://geekswithblogs.net/Mohamed/archive/2007/08/20/Dark-Visual-Studio-With-Resharper---My-VS-Settings-Colors.aspx" href="http://geekswithblogs.net/Mohamed/archive/2007/08/20/Dark-Visual-Studio-With-Resharper---My-VS-Settings-Colors.aspx">http://geekswithblogs.net/Mohamed/archive/2007/08/20/Dark-Visual-Studio-With-Resharper---My-VS-Settings-Colors.aspx</a></p> <p>If you use <a href="http://www.jetbrains.com/resharper/" target="_blank">ReSharper</a>  the normal settings people export don’t work correctly and you will have to do a lot of customisations yourself. </p> <p>I based mine on Mohamed’s one and have done some changes, especially to XML and HTML views. I have found it much easier on my eyes and really enjoy it. So I thought I would share it with the interwebs.</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZ7jscM3CjtGYjom3ebzydG6B6Vl_0p3srYbvMkHzuAEOsXJkmuVKx6104NI-qTR1KbdRuFTqQ9kzuiHcf5fIMPwHLFCS8sp_zx_UmpQx_B312awNAofgvekL5zLXR8mfhFkrEaQuXvGw/s1600-h/image7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7zWQSxZe_00idBcHYdK_weeuNjrM2ay4FCDAaLlOdAP7tSkq5hBOAE1oCd8lPcXXkoo2UJC89yRYy8Kt9bWUP6xBVXY3ir_y1x7SIkr6MRLVXfklSZWaCPSaLLF405at2mNaHuLhWvQs/?imgmax=800" width="903" height="526" /></a> Please remember these Fonts and Colours are for VS2008 + R# <iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-2712551cfca7fd25.skydrive.live.com/embedrow.aspx/Projects/VS2008R%7C3Dark-FontsColours.zip" frameborder="0" marginwidth="0" scrolling="no"></iframe></p> <p>Tools | Import and Export Settings | Import selected environment settings | Yes, save my current settings | Browse |VS2008R#Dark-FontsColours.vssettings | make sure it is importing Fonts and Colours only | Finish | Enjoy</p> <p>Let me know if you like them.</p> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com1tag:blogger.com,1999:blog-3068597877298439925.post-1296120915816045972009-01-10T23:00:00.001+00:002009-01-10T23:00:33.514+00:00Windows 7 beta<p>After spending half a day fighting with <a href="http://msdn.microsoft.com/en-gb/subscriptions/default.aspx" target="_blank">MSDN subscriber downloads</a> on the day of release on Thursday, anyone can now download it from <a title="http://www.microsoft.com/windows/windows-7/beta-download.aspx" href="http://www.microsoft.com/windows/windows-7/beta-download.aspx">http://www.microsoft.com/windows/windows-7/beta-ownload.aspx</a> and give it a try. I of course had to test it out, see if the companies software I write installs and works on it ;). I fired up Windows 7 x86 in a Virtual Machine, I currently use <a href="http://www.virtualbox.org/" target="_blank">VirtualBox</a> which I think rocks ! about 35 minutes later it was done, install perfectly worked right off the bat. Runs a lot better than the Vista VMs I have and the only tweaking I had to do was use the Compatibility Troubleshooter to install the Guest Additions, but that was it.</p> <p>Feeling confident with the new operating system I wipe my Dell XPS M1730 laptop and installed Window 7 x64 replacing my current Vista x64. It installed quickly ran and with no problems, only had to install the latest <a href="http://www.nvidia.com/" target="_blank">Nvidia</a> drivers to get better resolutions, but then I had to do that on Vista too. You can pick Laptop <a href="http://www.nvidia.com/" target="_blank">Nvidia</a> driver direct from <a href="http://www.nvidia.com/" target="_blank">Nvidia</a> now and not the rarely update ones by laptop vendors. The rest of the hardware which was unknown after install was picked up by Windows update which was the Creative inbuilt laptop camera and the Ricoh Memory card reader. Been x64 bit I was a bit worried as Vista x64 half a year ago took me ages to get everything running and I really had to hunt around for the drivers, Windows 7 x64 just worked, nice.</p> <p>It runs really well, it is slicker and snappier than Vista, it looks very much like Vista but the changes have made a huge difference. For a beta it is bloody good, well done Microsoft. Now to finish installing the useful software as <a href="http://www.tweetdeck.com" target="_blank">TweetDeck</a> won’t get any of my work done.</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:386dfdc9-eebe-4288-8536-3108bacbbc11" class="wlWriterEditableSmartContent">Technorati Tags: <a href="http://technorati.com/tags/Windows+7" rel="tag">Windows 7</a></div> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-66187340385998931172008-11-25T15:50:00.001+00:002008-11-25T15:50:37.863+00:00DDD7: How to develop .Net on Linux using Ubuntu distro<p>Wow, my first time presenting and a lot of panicking. I hope those who came enjoyed it, and now feel the world of <a target="_blank" href="http://www.linux.org/">Linux</a> is a less scary place for us .Net developers. <br />Here is my presentation: <iframe style="border-bottom: #dde5e9 1px solid; border-left: #dde5e9 1px solid; padding-bottom: 0px; background-color: #ffffff; margin: 3px; padding-left: 0px; width: 240px; padding-right: 0px; height: 26px; border-top: #dde5e9 1px solid; border-right: #dde5e9 1px solid; padding-top: 0px" marginheight="0" src="http://cid-2712551cfca7fd25.skydrive.live.com/embedrow.aspx/Projects/DDD7/DotNetOnLinuxPresentation.pptx" frameborder="0" marginwidth="0" scrolling="no"></iframe></p> <p>Every DDD session this year has been filmed; so if you missed it watch the <a href="http://www.developerday.co.uk/">DDD</a> site for the video. Please also submit your <a target="_blank" href="http://www.developerday.co.uk/ddd/feedback.asp">feedback</a>.</p> <p>I will be doing a few posts on setting up <a target="_blank" href="http://www.ubuntu.com/">Ubuntu</a> and adding some addition content which I didn't have time to demonstrate.</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:241b8024-f052-464b-b5b7-76983f245246" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/C#" rel="tag">C#</a>,<a href="http://technorati.com/tags/DDD7" rel="tag">DDD7</a>,<a href="http://technorati.com/tags/Mono" rel="tag">Mono</a>,<a href="http://technorati.com/tags/Linux" rel="tag">Linux</a></div> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-87494587149953235532008-10-10T10:05:00.001+01:002008-10-10T10:05:24.200+01:00"How to develop .Net on Linux using Ubuntu distro" now showing at DDD7<p>Thank you too everyone who voted for "How to develop .Net on Linux using Ubuntu distro" session at <a target="_blank" href="http://www.developerday.co.uk">DDD7</a>. Was not excepting this session to get chosen was hoping the <a target="_blank" href="http://wix.sourceforge.net/">WiX</a> would be selected, if any at all. This is my first time speaking at <a target="_blank" href="http://www.developerday.co.uk">DDD</a>, or any large/medium event for that matter. So excited and very nervous at the same time, should be fun !</p> <p>DDD7 <br /><a href="http://www.developerday.co.uk">www.developerday.co.uk</a></p> <p>When: Saturday, November 22, 2008 - 9:00 to 17:00 <br />Where: Microsoft, Thames Valley Park, Reading, Berkshire RG6 1WG, England</p> <p>Watch out for registration as places go very quickly</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:9fe14c3c-1f07-471e-b222-e7dd102874f6" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/DDD" rel="tag">DDD</a>,<a href="http://technorati.com/tags/DDD7" rel="tag">DDD7</a>,<a href="http://technorati.com/tags/Mono" rel="tag">Mono</a></div> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com3tag:blogger.com,1999:blog-3068597877298439925.post-19637870149436184492008-09-03T14:16:00.001+01:002008-09-03T14:16:24.709+01:00DDD7 session voting now open<p><a target="_blank" href="http://www.developerday.co.uk/ddd/default.asp">DeveloperDeveloperDeveloper! Day</a> 7 which is been held on Saturday, 22nd November 2008 has now opened the <a target="_blank" href="http://www.developerday.co.uk/ddd/votesessions.asp">voting for sessions</a> to build the agenda for the day. I has submitted 3 sessions; How FIT are you ?, Introduction to Windows Installer XML (WiX) and How to develop .Net on Linux using Ubuntu distro. So please vote for me !</p> <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:67e57690-5852-45c7-af42-b01cc63e7f9c" class="wlWriterSmartContent">Technorati Tags: <a href="http://technorati.com/tags/DDD" rel="tag">DDD</a></div> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-79406983794293460442008-07-11T10:50:00.001+01:002008-07-11T10:50:08.308+01:00Alt.Net UK September Registration Open<p>The <a href="http://altdotnet.org/events/5">registration</a> for the Alt.Net UK Conference is now open. For more information check out <a href="http://codebetter.com/blogs/ian_cooper/default.aspx" target="_blank">Ian Cooper</a>'s post <a title="Alt.Net UK September" href="http://codebetter.com/blogs/ian_cooper/archive/2008/07/09/alt-net-uk-september.aspx">Alt.Net UK September</a>.</p> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-22970543037118331742008-06-20T12:41:00.001+01:002008-06-20T12:41:23.606+01:00XSLT - javascript escaping<p>I could not find a way to do this without writing a template. <br />I started one then luckily through the power of the Internet found a better one.  Done by <a href="http://www.jenitennison.com" target="_blank">Jeni Tennison</a> found in the <a href="http://www.mulberrytech.com/xsl/xsl-list/" target="_blank">xsl-list</a> archives and I have reproduce here.</p> <div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:26611964-5cfa-4204-8c5e-7e0f046493c2" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; width: 570px; padding-top: 0px"><pre style="background-color:White;;overflow: auto;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:template </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="escape-javascript"</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:param </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="string"</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:choose</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:when </span><span style="color: #FF0000;">test</span><span style="color: #0000FF;">='contains($string, </span><span style="color: #FF0000;">"&apos;")'</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:call-template </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="escape-javascript"</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:with-param </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="string"</span><span style="color: #FF0000;"><br /> select</span><span style="color: #0000FF;">='substring-before($string, </span><span style="color: #FF0000;">"&apos;")' </span><span style="color: #0000FF;">/></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:call-template</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:text</span><span style="color: #0000FF;">></span><span style="color: #000000;">\'</span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:text</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:call-template </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="escape-javascript"</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:with-param </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="string"</span><span style="color: #FF0000;"><br /> select</span><span style="color: #0000FF;">='substring-after($string, </span><span style="color: #FF0000;">"&apos;")' </span><span style="color: #0000FF;">/></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:call-template</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:when</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:when </span><span style="color: #FF0000;">test</span><span style="color: #0000FF;">="contains($string, '&#xA;')"</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:call-template </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="escape-javascript"</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:with-param </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="string"</span><span style="color: #FF0000;"><br /> select</span><span style="color: #0000FF;">="substring-before($string, '&#xA;')"</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:call-template</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:text</span><span style="color: #0000FF;">></span><span style="color: #000000;">\n</span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:text</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:call-template </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="escape-javascript"</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:with-param </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="string"</span><span style="color: #FF0000;"><br /> select</span><span style="color: #0000FF;">="substring-after($string, '&#xA;')"</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:call-template</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:when</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:when </span><span style="color: #FF0000;">test</span><span style="color: #0000FF;">="contains($string, '\')"</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:value-of </span><span style="color: #FF0000;">select</span><span style="color: #0000FF;">="substring-before($string, '\')"</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:text</span><span style="color: #0000FF;">></span><span style="color: #000000;">\\</span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:text</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:call-template </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="escape-javascript"</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:with-param </span><span style="color: #FF0000;">name</span><span style="color: #0000FF;">="string"</span><span style="color: #FF0000;"><br /> select</span><span style="color: #0000FF;">="substring-after($string, '\')"</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:call-template</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:when</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"><</span><span style="color: #800000;">xsl:otherwise</span><span style="color: #0000FF;">><</span><span style="color: #800000;">xsl:value-of </span><span style="color: #FF0000;">select</span><span style="color: #0000FF;">="$string"</span><span style="color: #FF0000;"> </span><span style="color: #0000FF;">/></</span><span style="color: #800000;">xsl:otherwise</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /> </span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:choose</span><span style="color: #0000FF;">></span><span style="color: #000000;"><br /></span><span style="color: #0000FF;"></</span><span style="color: #800000;">xsl:template</span><span style="color: #0000FF;">></span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-64088727631233199362008-06-19T18:12:00.001+01:002008-06-19T18:12:13.297+01:00Calling all girl geeks<p><a href="http://girlygeekdom.blogspot.com" target="_blank">Girly Geekdom blog</a> is running a competition to get more girls presenting at <a href="http://www.developerday.co.uk" target="_blank">DDD</a> this year. All you have to do is submit a session for DDD and if your session is selected you could win a 1 year MSDN subscription. For full details:</p> <p><a href="http://girlygeekdom.blogspot.com/2008/06/submit-ddd-session-win-msdn-premium.html" target="_blank">http://girlygeekdom.blogspot.com/2008/06/submit-ddd-session-win-msdn-premium.html</a></p> <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:6c7a00d5-c43e-4bdc-b8e2-c16c0cd07ecb" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/MSDN" rel="tag">MSDN</a>,<a href="http://technorati.com/tags/Competition" rel="tag">Competition</a>,<a href="http://technorati.com/tags/DDD" rel="tag">DDD</a>,<a href="http://technorati.com/tags/GirlyGeekdom" rel="tag">GirlyGeekdom</a></div> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-61629959021433228652008-06-18T17:28:00.001+01:002008-06-19T12:34:33.667+01:00alt.net london beers<p>Had a good evening last night with the alt.net lads and lady. About 15 people turned up for either the beers and talk and/or dinner.This was only the second one and seeing if people will turn up. Mainly intros and telling others what you are doing technology wise. REST seemed to be the main topic for the main part "resources not services !".</p> <p><a href="http://lh5.ggpht.com/hendersont/SFk3seq-bKI/AAAAAAAAACQ/bRnylChPnv4/s1600-h/alt.net_2_london_18%5B9%5D.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="105" alt="alt.net_2_london_18" src="http://lh3.ggpht.com/hendersont/SFk3srlvdLI/AAAAAAAAACU/ZEvhaAVssis/alt.net_2_london_18_thumb%5B7%5D.jpg?imgmax=800" width="460" border="0" /></a> </p> <p>Here are some photos from the evening <a href="http://www.flickr.com/photos/holytshirt/sets/72157605676029098/" target="_blank">http://www.flickr.com/photos/holytshirt/sets/72157605676029098/</a></p> <p><a href="http://serialseb.blogspot.com/" target="_blank">Seb</a> is still coming up with a format for the night. Which will follow something like this:</p> <p>18:30 - 19:00 drinks <br />19:00 - 20:00 talk about a predetermined topic <br />20:00 - late    dinner and each person comments on the topic, which gets posted up.</p> <p>How should we tag our posts, photos ?</p> <p>1. alt.net, london, beers <br />2. alt.net.uk.london.beers</p> <p>Should we compile a list of attendees ? </p> <p>See you next time !</p> <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c27506f9-2da5-4283-b466-b5b1edccc9ef" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/altnet" rel="tag">altnet</a></div> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com2tag:blogger.com,1999:blog-3068597877298439925.post-74737896196286476372008-06-18T16:49:00.001+01:002008-06-18T16:49:25.485+01:00String array to Int array<p>Note to self, putting it down in writing so I don't forget it for the umpteenth time.</p> <div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:cf8fac4e-e6a4-4313-b363-b9724fc351cd" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; width: 517px; padding-top: 0px"><pre style="background-color:White;;overflow: auto;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF;">string</span><span style="color: #000000;"> stringOfNumbers </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">"</span><span style="color: #800000;">1,2,3,4,5,6,7</span><span style="color: #800000;">"</span><span style="color: #000000;">;<br /></span><span style="color: #0000FF;">string</span><span style="color: #000000;">[] stringNumbers </span><span style="color: #000000;">=</span><span style="color: #000000;"> stringOfNumbers.Split(</span><span style="color: #800000;">'</span><span style="color: #800000;">,</span><span style="color: #800000;">'</span><span style="color: #000000;">);<br /></span><span style="color: #0000FF;">int</span><span style="color: #000000;">[] numbers </span><span style="color: #000000;">=</span><span style="color: #000000;"> Array.ConvertAll(stringNumbers, s </span><span style="color: #000000;">=></span><span style="color: #000000;"> </span><span style="color: #0000FF;">int</span><span style="color: #000000;">.Parse(s));</span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-80026261833941354822008-05-19T11:57:00.001+01:002008-05-19T11:57:24.027+01:00How do I say => as used in lambdas<p>When I did my talk recently someone asked what the predicate c => c.CompanyId == (int) results.Element("ID") meant as they had not seen this syntax before. I explained it was the new lambda syntax in .net 3.5, I tried to read the code out and realised I did not know how to say "=>". I was stumped and it has been bugging me ever since.</p> <p>I read this blog post this morning <a title="Reading Code Over the Telephone" href="http://blogs.msdn.com/ericlippert/archive/2008/05/16/reading-code-over-the-telephone.aspx">Reading Code Over the Telephone</a> by <a href="http://blogs.msdn.com/ericlippert/default.aspx" target="_blank">Eric Lippert</a> and he goes some way to helping me solve this riddle.</p> <p><em>I personally would say c=>c+1 as "see <strong>goes to</strong> see plus one". Some variations that I've heard: </em></p> <p><em>For a projection, (Customer c)=>c.Name: "customer see <strong>becomes</strong> see dot name" </em></p> <p><em>For a predicate, (Customer c)=>c.Age > 21: "customer see <strong>such that</strong> see dot age is greater than twenty-one"</em></p> <p>So taking Eric's advice my predicate would be said like this "Company see such that see dot company id is equal to the results element called ID". After reading the comments I thing I might like this one "Company see is used to evaluate see dot company id equal to the result element ID".</p> <p>I like the idea that if your code is clear enough to read over the phone to someone then your code must be self explanatory, something to keep in mind when writing code. </p> <p>I still have a feeling I will have to explain a bit more, maybe not, what do you think? How would you say it ? Is this clear enough ?</p> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-23051448435063920372008-05-02T17:08:00.001+01:002008-05-02T17:08:16.783+01:00Acrobat 8, panning, zooming, page flipping speed up<p>Adobe has snuck in something new into their bloatware PDF reader. If your CPU supports it, you only see the option if it is supported, you can speed up panning, zooming and page flipping.</p> <p>Edit|Preferences|Page Display</p> <p>In the Rendering Section, if the check box “Use 2D GPU acceleration” appears check it.</p> <p><a href="http://lh3.ggpht.com/hendersont/SBs8bkwtPoI/AAAAAAAAABY/X0QPS_zTO_Y/s1600-h/clip_image002%5B9%5D.jpg"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="131" alt="Render Settings" src="http://lh5.ggpht.com/hendersont/SBs8cEwtPpI/AAAAAAAAABk/QyQmzFdptS4/clip_image002_thumb%5B6%5D.jpg?imgmax=800" width="244" border="0" /></a></p> <p>For detail on its effects here is the detail.</p> <p><a href="http://blogs.adobe.com/2DGPURendering/">http://blogs.adobe.com/2DGPURendering/</a></p> HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com0tag:blogger.com,1999:blog-3068597877298439925.post-64920655784969738442008-04-25T17:49:00.005+01:002008-04-26T01:36:07.334+01:00LINQ to XML and SQL<p>From my presentation given at the <a href="http://www.dnug.org.uk/" target="_blank">London .Net User Group</a> on 2008-04-28.</p> <p>Since LINQ came out, we have been told about how LINQ creates a common way for developers to work with; XML, SQL, Objects, anything. But all the demos I have seen so far show examples of LINQ to SQL, LINQ to XML or LINQ to whatever. Never demonstrating mixing different "LINQs" together, maybe it is just me.</p> <p>Recently a project required getting results from a web service and adding to it with data from a database. I thought this is a perfect opportunity to use LINQ as I want to create a single object based on data from two different sources.</p> <p>The background to this is, the web service delivers a list of companies, but we require a flag to display if the company is still trading or not. Currently this is not available via the web service but the company can provide a csv file of company ids of the companies that are no longer trading, which you load into a table in your database. Once you receive your results from the web service you check to see if the id exists is in the database table.</p> <p>First you need your XML and now days the new flavoured Object for working with XML is the <a href="http://msdn2.microsoft.com/en-us/library/system.xml.linq.xdocument.aspx" target="_blank">XDocument</a> class.</p> <p></p><div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:7ab5305f-a2ea-40c7-8745-59d46bcdeac5" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;;overflow: auto;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000;">XDocument resultsXml </span><span style="color: #000000;">=</span><span style="color: #000000;"> XDocument.Load(MapPath(</span><span style="color: #800000;">"</span><span style="color: #800000;">Companies.xml</span><span style="color: #800000;">"</span><span style="color: #000000;">)); </span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div><p></p><br />Next create the <a href="http://msdn2.microsoft.com/en-us/library/system.data.linq.datacontext.aspx" target="_blank">DataContext</a> for the LINQ to SQL <br /><p></p><br /><div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:1cacb3d5-3ba7-42d0-8b3f-539f426794e3" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; width: 402px; padding-top: 0px"><pre style="background-color:White;;overflow: auto;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000;">DataClassesDataContext db </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> DataClassesDataContext()</span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div><br /><p></p><br /><p>Now use LINQ to XML to get each company and use LINQ to SQL to see if the id exists in the database, the .Any translates to EXISTS in SQL.</p><br /><p></p><br /><div class="wlWriterSmartContent" id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:b5949f71-9d81-494d-a368-e1778ab9311f" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;;overflow: auto;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000;">var companies </span><span style="color: #000000;">=</span><span style="color: #000000;"> from results </span><span style="color: #0000FF;">in</span><span style="color: #000000;"> resultsXml.Descendants(</span><span style="color: #800000;">"</span><span style="color: #800000;">COMPANY</span><span style="color: #800000;">"</span><span style="color: #000000;">)<br /> select </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Company<br /> {<br /> Id </span><span style="color: #000000;">=</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">int</span><span style="color: #000000;">) results.Element(</span><span style="color: #800000;">"</span><span style="color: #800000;">ID</span><span style="color: #800000;">"</span><span style="color: #000000;">),<br /> Name </span><span style="color: #000000;">=</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">string</span><span style="color: #000000;">) results.Element(</span><span style="color: #800000;">"</span><span style="color: #800000;">NAME</span><span style="color: #800000;">"</span><span style="color: #000000;">),<br /> OutOfBusiness </span><span style="color: #000000;">=</span><span style="color: #000000;"> db.OutOfBusinesses.Any(company </span><span style="color: #000000;">=></span><span style="color: #000000;"> company.CompanyId </span><span style="color: #000000;">==</span><span style="color: #000000;"> (</span><span style="color: #0000FF;">int</span><span style="color: #000000;">) results.Element(</span><span style="color: #800000;">"</span><span style="color: #800000;">ID</span><span style="color: #800000;">"</span><span style="color: #000000;">))<br /> };</span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin. http://dunnhq.com --></div><br /><p></p><br /><p>As you can see this is not much code, think how much you would have to write to do this without LINQ.</p><br /><br /><p>Here is the demonstration code</p><br /><iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 26px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-2712551cfca7fd25.skydrive.live.com/embedrow.aspx/Projects/LINQXMLSQL.zip" frameborder="0" scrolling="no"></iframe><br /><br /><p> </p><br /><br /><p>Keep on keeping on !</p>HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com2tag:blogger.com,1999:blog-3068597877298439925.post-6309947602954762982008-04-25T17:39:00.003+01:002008-04-26T01:22:16.496+01:00Here we go...<p>I was trying to be retro and not have a blog, but it has not gone down well. So after much hassling and *gasps* "you don't have a blog?", here we go ...  more like in the words of Pink Floyd "I sentence you to be exposed before your peers" ...</p>HolyTshirThttp://www.blogger.com/profile/17940288175611154760noreply@blogger.com1