<?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>Brian Low</title>
	<atom:link href="http://www.brianlow.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brianlow.com</link>
	<description>Software Development Notes</description>
	<lastBuildDate>Fri, 16 Jul 2010 22:02:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Find Conflicting Assembly References</title>
		<link>http://www.brianlow.com/index.php/2010/01/25/find-conflicting-assembly-references/</link>
		<comments>http://www.brianlow.com/index.php/2010/01/25/find-conflicting-assembly-references/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 05:28:22 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[.Net]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=199</guid>
		<description><![CDATA[A small test to help resolve the compiler warning:
warning MSB3247: Found conflicts between different versions of the same dependent assembly.

Point it to the build folder of your project and it will look for referenced assemblies with the same short name but different full names.

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
&#160;
namespace MyProject
&#123;
    &#91;TestFixture&#93;
 [...]]]></description>
			<content:encoded><![CDATA[<p>A small test to help resolve the compiler warning:</p>
<blockquote><p>warning MSB3247: Found conflicts between different versions of the same dependent assembly.
</p></blockquote>
<p>Point it to the build folder of your project and it will look for referenced assemblies with the same short name but different full names.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.IO</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Reflection</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">NUnit.Framework</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">namespace</span> MyProject
<span style="color: #000000;">&#123;</span>
    <span style="color: #000000;">&#91;</span>TestFixture<span style="color: #000000;">&#93;</span>
    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> UtilityTest
    <span style="color: #000000;">&#123;</span>
        <span style="color: #000000;">&#91;</span>Test<span style="color: #000000;">&#93;</span>
        <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">void</span> FindConflictingReferences<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            var assemblies <span style="color: #008000;">=</span> GetAllAssemblies<span style="color: #000000;">&#40;</span><span style="color: #666666;">@&quot;E:\dev\myapp\myproject\bin\debug&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            var references <span style="color: #008000;">=</span> GetReferencesFromAllAssemblies<span style="color: #000000;">&#40;</span>assemblies<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            var groupsOfConflicts <span style="color: #008000;">=</span> FindReferencesWithTheSameShortNameButDiffererntFullNames<span style="color: #000000;">&#40;</span>references<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var group <span style="color: #0600FF;">in</span> groupsOfConflicts<span style="color: #000000;">&#41;</span>
            <span style="color: #000000;">&#123;</span>
                Console.<span style="color: #0600FF;">Out</span>.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Possible conflicts for {0}:&quot;</span>, group.<span style="color: #0000FF;">Key</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var reference <span style="color: #0600FF;">in</span> group<span style="color: #000000;">&#41;</span>
                <span style="color: #000000;">&#123;</span>
                    Console.<span style="color: #0600FF;">Out</span>.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;{0} references {1}&quot;</span>,
                                          reference.<span style="color: #0000FF;">Assembly</span>.<span style="color: #0000FF;">Name</span>.<span style="color: #0000FF;">PadRight</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">25</span><span style="color: #000000;">&#41;</span>,
                                          reference.<span style="color: #0000FF;">ReferencedAssembly</span>.<span style="color: #0000FF;">FullName</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #000000;">&#125;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">private</span> IEnumerable<span style="color: #008000;">&lt;</span>IGrouping<span style="color: #008000;">&lt;</span><span style="color: #FF0000;">string</span>, Reference<span style="color: #008000;">&gt;&gt;</span> FindReferencesWithTheSameShortNameButDiffererntFullNames<span style="color: #000000;">&#40;</span>List<span style="color: #008000;">&lt;</span>Reference<span style="color: #008000;">&gt;</span> references<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            <span style="color: #0600FF;">return</span> from reference <span style="color: #0600FF;">in</span> references
                   group reference by reference.<span style="color: #0000FF;">ReferencedAssembly</span>.<span style="color: #0000FF;">Name</span>
                       into referenceGroup
                       where referenceGroup.<span style="color: #0000FF;">ToList</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Select</span><span style="color: #000000;">&#40;</span>reference <span style="color: #008000;">=&gt;</span> reference.<span style="color: #0000FF;">ReferencedAssembly</span>.<span style="color: #0000FF;">FullName</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Distinct</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Count</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">1</span>
                       select referenceGroup<span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">private</span> List<span style="color: #008000;">&lt;</span>Reference<span style="color: #008000;">&gt;</span> GetReferencesFromAllAssemblies<span style="color: #000000;">&#40;</span>List<span style="color: #008000;">&lt;</span>Assembly<span style="color: #008000;">&gt;</span> assemblies<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            var references <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&lt;</span>Reference<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var assembly <span style="color: #0600FF;">in</span> assemblies<span style="color: #000000;">&#41;</span>
            <span style="color: #000000;">&#123;</span>
                <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>var referencedAssembly <span style="color: #0600FF;">in</span> assembly.<span style="color: #0000FF;">GetReferencedAssemblies</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                <span style="color: #000000;">&#123;</span>
                    references.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">new</span> Reference
                    <span style="color: #000000;">&#123;</span>
                        Assembly <span style="color: #008000;">=</span> assembly.<span style="color: #0000FF;">GetName</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,
                        ReferencedAssembly <span style="color: #008000;">=</span> referencedAssembly
                    <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #000000;">&#125;</span>
            <span style="color: #000000;">&#125;</span>
            <span style="color: #0600FF;">return</span> references<span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">private</span> List<span style="color: #008000;">&lt;</span>Assembly<span style="color: #008000;">&gt;</span> GetAllAssemblies<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> path<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            var files <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&lt;</span>FileInfo<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            var directoryToSearch <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> DirectoryInfo<span style="color: #000000;">&#40;</span>path<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            files.<span style="color: #0000FF;">AddRange</span><span style="color: #000000;">&#40;</span>directoryToSearch.<span style="color: #0000FF;">GetFiles</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;*.dll&quot;</span>, SearchOption.<span style="color: #0000FF;">AllDirectories</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            files.<span style="color: #0000FF;">AddRange</span><span style="color: #000000;">&#40;</span>directoryToSearch.<span style="color: #0000FF;">GetFiles</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;*.exe&quot;</span>, SearchOption.<span style="color: #0000FF;">AllDirectories</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF;">return</span> files.<span style="color: #0000FF;">ConvertAll</span><span style="color: #000000;">&#40;</span>file <span style="color: #008000;">=&gt;</span> Assembly.<span style="color: #0000FF;">LoadFile</span><span style="color: #000000;">&#40;</span>file.<span style="color: #0000FF;">FullName</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">class</span> Reference
        <span style="color: #000000;">&#123;</span>
            <span style="color: #0600FF;">public</span> AssemblyName Assembly <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
            <span style="color: #0600FF;">public</span> AssemblyName ReferencedAssembly <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2010/01/25/find-conflicting-assembly-references/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Resharper Shortcuts</title>
		<link>http://www.brianlow.com/index.php/2009/07/28/resharper-shortcuts/</link>
		<comments>http://www.brianlow.com/index.php/2009/07/28/resharper-shortcuts/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 15:59:07 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=197</guid>
		<description><![CDATA[A few custom shortcuts because I can never remember which Resharper command they are&#8230;
Alt-N: ReSharper.ReSharper_UnitTest_ContextRun
Ctrl-Alt-T: ReSharper.ReSharper_ShowUnitTestExplorer
Ctrl-Alt-R: ReSharper.ReSharper_ShowUnitTestSessions
Ctrl-Alt-E: ReSharper.ReSharper_UnitTest_RunCurrentSession
Visual Studio macro for resetting these bindings:

Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
&#160;
Public Module Module1
&#160;
    Public Sub BindShortcuts()
        Bind(&#34;ReSharper.ReSharper_UnitTest_ContextRun&#34;, &#34;Alt+n&#34;)
        Bind(&#34;ReSharper.ReSharper_ShowUnitTestExplorer&#34;, &#34;Ctrl+Alt+T&#34;)
 [...]]]></description>
			<content:encoded><![CDATA[<p>A few custom shortcuts because I can never remember which Resharper command they are&#8230;</p>
<p>Alt-N: ReSharper.ReSharper_UnitTest_ContextRun<br />
Ctrl-Alt-T: ReSharper.ReSharper_ShowUnitTestExplorer<br />
Ctrl-Alt-R: ReSharper.ReSharper_ShowUnitTestSessions<br />
Ctrl-Alt-E: ReSharper.ReSharper_UnitTest_RunCurrentSession</p>
<p>Visual Studio macro for resetting these bindings:</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
&nbsp;
<span style="color: #000080;">Public</span> Module Module1
&nbsp;
    <span style="color: #000080;">Public</span> <span style="color: #000080;">Sub</span> BindShortcuts()
        Bind(&quot;ReSharper.ReSharper_UnitTest_ContextRun&quot;, &quot;Alt+n&quot;)
        Bind(&quot;ReSharper.ReSharper_ShowUnitTestExplorer&quot;, &quot;Ctrl+Alt+T&quot;)
        Bind(&quot;ReSharper.ReSharper_ShowUnitTestSessions&quot;, &quot;Ctrl+Alt+R&quot;)
        Bind(&quot;ReSharper.ReSharper_UnitTest_RunCurrentSession&quot;, &quot;Ctrl+Alt+E&quot;)
        Bind(&quot;File.CloseAllButThis&quot;, &quot;Ctrl+Alt+Shift+W&quot;)
        MsgBox(&quot;Done.&quot;)
    <span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
    <span style="color: #000080;">Private</span> <span style="color: #000080;">Sub</span> Bind(<span style="color: #000080;">ByVal</span> commandName <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>, <span style="color: #000080;">ByVal</span> globalBinding <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>)
        <span style="color: #000080;">Dim</span> command <span style="color: #000080;">As</span> Command
        command = DTE.Commands.Item(commandName, 1)
        command.Bindings = &quot;Global::&quot; &amp; globalBinding
    <span style="color: #000080;">End</span> <span style="color: #000080;">Sub</span>
&nbsp;
<span style="color: #000080;">End</span> Module</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2009/07/28/resharper-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resharper live templates for NUnit</title>
		<link>http://www.brianlow.com/index.php/2009/04/06/resharper-live-templates-for-nunit/</link>
		<comments>http://www.brianlow.com/index.php/2009/04/06/resharper-live-templates-for-nunit/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 08:57:51 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[.Net]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=173</guid>
		<description><![CDATA[
aae       Assert.AreEqual
aane      Assert.AreNotEqual
aif       Assert.IsFalse
ait       Assert.IsTrue
ain       Assert.IsNull
ainn      Assert.IsNotNull
setup     NUnit [Setup] method
teardown  NUnit [TearDown] method
test    [...]]]></description>
			<content:encoded><![CDATA[<pre>
aae       Assert.AreEqual
aane      Assert.AreNotEqual
aif       Assert.IsFalse
ait       Assert.IsTrue
ain       Assert.IsNull
ainn      Assert.IsNotNull
setup     NUnit [Setup] method
teardown  NUnit [TearDown] method
test      NUnit [Test] method
</pre>
<p><a href="/wordpress/wp-content/uploads/2009/03/brian-live-templates.xml">For ReSharper 3.0</a><br/><br />
<a href='/wordpress/wp-content/uploads/nunit-live-template-45.xml'>For ReSharper 4.5</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2009/04/06/resharper-live-templates-for-nunit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EvoLisa Video</title>
		<link>http://www.brianlow.com/index.php/2009/01/26/evolisa-video/</link>
		<comments>http://www.brianlow.com/index.php/2009/01/26/evolisa-video/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 03:29:47 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=166</guid>
		<description><![CDATA[Here is a video of Roger Alsing&#8217;s EvoLisa project evolving an image of the Mona Lisa using random polygons. 
The video was made using Roger&#8217;s source code modified with Dan Bystrom&#8217;s FitnessCalculator written in assembler. The program was changed to output a frame whenever the image improves by 5%. The program was run for 16 [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a video of Roger Alsing&#8217;s <a href="http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/">EvoLisa</a> project evolving an image of the Mona Lisa using random polygons. </p>
<p>The video was made using Roger&#8217;s source code modified with <a href="http://danbystrom.se/2008/12/22/optimizing-away-ii/">Dan Bystrom&#8217;s FitnessCalculator</a> written in assembler. The program was changed to output a frame whenever the image improves by 5%. The program was run for 16 hours to generate the 660 frames used in the video below. The final image uses 242 polygons (average 6.9 points per polygon) and is the 7,052,061th generation. It only took 48 seconds to generate the first half of this video and the remaining 16 hours to generate the second half.</p>
<p>I used VirtualDub to combine the frames into a video. The music clip is Company I from Philip Glass. </p>
<p>By the way, <a href="http://vimeo.com/">Vimeo</a> kicks butt on YouTube &#8211; higher quality videos and a better interface for uploading/managing videos.</p>
<p><object width="550" height="310"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2962317&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=2962317&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00adef&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="310"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2009/01/26/evolisa-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anti-Virus Software is Useless</title>
		<link>http://www.brianlow.com/index.php/2009/01/25/anti-virus-software-is-useless/</link>
		<comments>http://www.brianlow.com/index.php/2009/01/25/anti-virus-software-is-useless/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 00:14:58 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=146</guid>
		<description><![CDATA[Over the holidays I was infected with multiple viruses. One them was Trojan.Vundo.GCY. It&#8217;s job is to download other viruses and malware. I had over a dozen files infected with various viruses causing popups and network slowdown.
I tried 6 or 7 anti-virus / anti-malware products and found they had abysmally low detection rates. The best [...]]]></description>
			<content:encoded><![CDATA[<p>Over the holidays I was infected with multiple viruses. One them was Trojan.Vundo.GCY. It&#8217;s job is to download other viruses and malware. I had over a <strong>dozen files infected with various viruses</strong> causing popups and network slowdown.</p>
<p>I tried 6 or 7 anti-virus / anti-malware products and found they had <strong>abysmally low detection rates</strong>. The best only finding 30% of infected files. This included software from <a href="http://security.symantec.com/sscv6/WelcomePage.asp">Symantec Online Security Scan</a>, <a href="http://www.eset.com/onlinescan/">Eset Nod32 Online Scanner</a>, <a href="http://www.bitdefender.com/PRODUCT-14-en--BitDefender-Free-Edition.html">BitDefender Free Edition</a>, <a href="http://free.avg.com/">AVG Free Edition</a>, <a href="http://www.pctools.com/spyware-doctor/">Spyware Doctor</a> from the Google Pack, <a href="http://www.malwarebytes.org/mbam.php">Malware Byte&#8217;s Anti-Malware</a> and <a href="http://www.lavasoft.com/">Ad-Aware Free</a>.</p>
<p>Perhaps using installed, retail versions would have given better results but I doubt it. All of the companies claim the free/online scanners use the same core engine and virus definitions as their retail products. I suspect this is true as it looks like these companies are competing on features like email integration, phishing protection and real-time scanning. I ran these scans from a fresh, uninfected install so its unlikely that any viruses were actively attempting to hide from a scan.</p>
<p>As a result, I won&#8217;t be purchasing anti-virus software in the near future. I will keep <a href="http://free.avg.com/">AVG Free</a> for quick scanning of files I believe are already clean. That statement shows how little confidence I have in these scanners. Despite this I think they are still good for catching the older viruses propagating among completely unprotected machines.</p>
<p>I did find a useful website: <a href="http://www.virustotal.com/">VirusTotal.com</a> lets you <strong>upload a file and scan it with almost 50 scanners</strong>. Here is an here is an <a href="http://www.virustotal.com/analisis/ee747077e9b5c11cf57019359c9231a0">example report</a>). They also have a small utility you can install to get a right-click -> Send To target. You are limited to scanning one file at a time though can you can upload a zip archive to scan several. There are a number of similar websites, but VirusTotal <a href="http://www.raymond.cc/blog/archives/2008/05/28/battle-of-the-6-online-malware-file-scanners/">appears to be the best</a>.</p>
<p><strong>My anti-virus/malware strategy:</strong></p>
<ul>
<li>Use <a href="http://free.avg.com/">AVG Free</a> for quick scanning of files I believe are already clean.</li>
<li>Turn off real-time scanning &#8211; it&#8217;s not worth the performance hit for such low detection rates.</li>
<li>Use <a href="http://www.virustotal.com/analisis/ee747077e9b5c11cf57019359c9231a0">VirusTotal</a> for scanning suspicious files.</li>
<li>Use <a href="http://www.google.com/chrome">Chrome</a> and respect the <a href="http://flickr.com/photos/88509406@N00/2873485733/">malware warnings</a>.</li>
</ul>
<p><strong>To recover from an infection:</strong></p>
<ul>
<li>Unplug infected drive.</li>
<li>Reinstall Windows on a new drive.</li>
<li>Reattached infected drive.</li>
<li>Install a virus/malware scanner. Run full/deep scan. Repeat a minimum of 3 times or until you stop finding infections.</li>
<li>Copy data from old drive and reformat.</li>
</ul>
<p>How do you prevent infections?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2009/01/25/anti-virus-software-is-useless/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zebra striping</title>
		<link>http://www.brianlow.com/index.php/2008/11/07/zebra-striping/</link>
		<comments>http://www.brianlow.com/index.php/2008/11/07/zebra-striping/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 06:05:43 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=132</guid>
		<description><![CDATA[From the article Zebra Striping: Does it Really Help?:
- no difference in speed or accuracy
- 46% preferred it, 33% didn&#8217;t care
If you are going to use zebra striping, keep it subtle.  
Update: a followup post with more research confirming this approach.
]]></description>
			<content:encoded><![CDATA[<p>From the article <a href="http://www.alistapart.com/articles/zebrastripingdoesithelp">Zebra Striping: Does it Really Help?</a>:</p>
<p>- no difference in speed or accuracy<br />
- 46% preferred it, 33% didn&#8217;t care</p>
<p>If you are going to use zebra striping, keep it subtle.  </p>
<p>Update: a <a href="http://www.alistapart.com/articles/zebrastripingmoredataforthecase">followup post</a> with more research confirming this approach.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2008/11/07/zebra-striping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>User Interface Design for Programmers</title>
		<link>http://www.brianlow.com/index.php/2008/11/06/user-interface-design-for-programmers/</link>
		<comments>http://www.brianlow.com/index.php/2008/11/06/user-interface-design-for-programmers/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 05:02:32 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=128</guid>
		<description><![CDATA[From Joel Spolsky&#8217;s article User Interface Design for Programmers:
- A user interface is well-designed when the program behaves exactly how the user thought it would.
- Don&#8217;t provide options unless the user really wants to choose
- Use real-world metaphors
- Affordances
- Consistency with existing standards (good or bad)
- Users don&#8217;t read manuals
- Users don&#8217;t read anything (make [...]]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://www.joelonsoftware.com/">Joel Spolsky</a>&#8217;s article <a href="http://www.joelonsoftware.com/uibook/fog0000000249.html">User Interface Design for Programmers</a>:</p>
<p>- A user interface is well-designed when the program behaves exactly how the user thought it would.<br />
- Don&#8217;t provide options unless the user really wants to choose<br />
- Use real-world metaphors<br />
- Affordances<br />
- Consistency with existing standards (good or bad)<br />
- Users don&#8217;t read manuals<br />
- Users don&#8217;t read anything (make text concise)<br />
- Users can&#8217;t control the mouse very well (large click targets)<br />
- Users can&#8217;t remember anything</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2008/11/06/user-interface-design-for-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build ASP.NET WebService from the Command-line</title>
		<link>http://www.brianlow.com/index.php/2008/08/31/build-aspnet-webservice-from-the-command-line/</link>
		<comments>http://www.brianlow.com/index.php/2008/08/31/build-aspnet-webservice-from-the-command-line/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 20:30:24 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[.Net]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=123</guid>
		<description><![CDATA[This NAnt target will build the project into a new folder with a (single) precompiled DLL. All source files and other non-deployment files are removed.

&#60;target name=&#34;publish.webservice&#34;&#62;
    &#60;exec basedir=&#34;.&#34;
          program=&#34;${msbuild.exe}&#34;
          commandline=&#34; ${web.project.file}
    [...]]]></description>
			<content:encoded><![CDATA[<p>This NAnt target will build the project into a new folder with a (single) precompiled DLL. All source files and other non-deployment files are removed.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;publish.webservice&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;exec</span> <span style="color: #000066;">basedir</span>=<span style="color: #ff0000;">&quot;.&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">program</span>=<span style="color: #ff0000;">&quot;${msbuild.exe}&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">commandline</span>=<span style="color: #ff0000;">&quot; ${web.project.file}</span>
<span style="color: #009900;">                        /nologo</span>
<span style="color: #009900;">                        /p:OutDir=${publish.webservice.dir}bin</span>
<span style="color: #009900;">                        /p:WebProjectOutputDir=${publish.webservice.dir}&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">workingdir</span>=<span style="color: #ff0000;">&quot;.&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">failonerror</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/target<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2008/08/31/build-aspnet-webservice-from-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading to WordPress 2.5 on BlueHost</title>
		<link>http://www.brianlow.com/index.php/2008/04/30/upgrading-to-wordpress-25-on-bluehost/</link>
		<comments>http://www.brianlow.com/index.php/2008/04/30/upgrading-to-wordpress-25-on-bluehost/#comments</comments>
		<pubDate>Thu, 01 May 2008 03:15:06 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/?p=64</guid>
		<description><![CDATA[WordPress 2.5 was released last month. Why can&#8217;t we upgrade using Fantastico? It turns out BlueHost has started their own Fanastico competitor called SimpleScripts. I doubt we&#8217;ll be seeing any new Fantastico updates. While Fantastico has had WordPress 2.5 scripts for at least three weeks, BlueHost&#8217;s tech support claims they are waiting on Fantastico to [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.5 was released last month. Why can&#8217;t we upgrade using Fantastico? It turns out BlueHost has started their own <a href="http://netenberg.com/fantastico.php">Fanastico</a> competitor called <a href="http://mattheaton.com/?p=134">SimpleScripts</a>. I doubt we&#8217;ll be seeing any new Fantastico updates. While Fantastico has had WordPress 2.5 scripts for at least <a href="http://www.techpastor.com/2008/04/08/wordpress-25-now-supported-by-fantastico/">three weeks</a>, BlueHost&#8217;s tech support claims they are waiting on Fantastico to release updated scripts. This is the first problem.</p>
<p>The second problem is the recommended migration procedure <a href="http://www.simplescripts.com/?p=articles/migrating_from_fantastico">here</a> and <a href="http://www.bluehostforum.com/showthread.php?t=12972">here</a>. It involves FTP clients and pulling database configuration bits from php files. This does not leave a good first impression of a product that is supposed to provide one-click installation and upgrades.</p>
<p>I ended up using the <a href="http://techie-buzz.com/wordpress-plugins/wordpress-automatic-upgrade-plugin.html">Wordpress Automatic Upgrader Plugin</a>. I still needed to use an FTP client to install the plugin but now I am not dependent on Fanastico or SimpleScripts. This plugin downloads the latest files directly from WordPress so updates should be available as soon as WordPress releases them. I encountered two problems while upgrading to 2.5:</p>
<ul>
<li> The plugin created backups but provided the wrong link to download them. I had to use the FTP client to download them manually. I believe this is because I have installed WordPress into a wordpress\ subfolder rather than into the root. </li>
<li>The plugin did not reactivate my plugins. I had to reactivate them manually.
</ul>
<p>On the positive side, <a href="http://www.simplescripts.com/?p=scripts">SimpleScripts</a> appears to be a more polished product compared to Fantastico. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2008/04/30/upgrading-to-wordpress-25-on-bluehost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset Sequence From Table</title>
		<link>http://www.brianlow.com/index.php/2008/04/29/reset-sequence-from-table/</link>
		<comments>http://www.brianlow.com/index.php/2008/04/29/reset-sequence-from-table/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 00:00:24 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.brianlow.com/index.php/2008/04/29/reset-sequence-from-table/</guid>
		<description><![CDATA[This procedure will lookup the maximum value used in a table then set the sequence to this value + 1. Based on code from from http://www.psoug.org/reference/sequences.html.

CREATE OR REPLACE PROCEDURE reset_sequence &#40;
seq_name IN VARCHAR2, startvalue IN PLS_INTEGER&#41; AS
&#160;
cval   INTEGER;
inc_by VARCHAR2&#40;25&#41;;
&#160;
BEGIN
  EXECUTE IMMEDIATE 'ALTER SEQUENCE ' &#124;&#124;seq_name&#124;&#124;' MINVALUE 0';
&#160;
  EXECUTE IMMEDIATE 'SELECT ' [...]]]></description>
			<content:encoded><![CDATA[<p>This procedure will lookup the maximum value used in a table then set the sequence to this value + 1. Based on code from from <a href="http://www.psoug.org/reference/sequences.html">http://www.psoug.org/reference/sequences.html</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">CREATE</span> <span style="color: #00F;">OR</span> <span style="color: #000;">REPLACE</span> <span style="color: #00F;">PROCEDURE</span> reset_sequence <span style="color: #00F;">&#40;</span>
seq_name <span style="color: #00F;">IN</span> <span style="color: #00F;">VARCHAR2</span><span style="color: #00F;">,</span> startvalue <span style="color: #00F;">IN</span> <span style="color: #00F;">PLS_INTEGER</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span>
&nbsp;
cval   <span style="color: #00F;">INTEGER</span><span style="color: #00F;">;</span>
inc_by <span style="color: #00F;">VARCHAR2</span><span style="color: #00F;">&#40;</span><span style="color: #800;">25</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
&nbsp;
<span style="color: #00F;">BEGIN</span>
  <span style="color: #00F;">EXECUTE</span> <span style="color: #00F;">IMMEDIATE</span> <span style="color: #F00;">'ALTER SEQUENCE '</span> <span style="color: #00F;">||</span>seq_name<span style="color: #00F;">||</span><span style="color: #F00;">' MINVALUE 0'</span><span style="color: #00F;">;</span>
&nbsp;
  <span style="color: #00F;">EXECUTE</span> <span style="color: #00F;">IMMEDIATE</span> <span style="color: #F00;">'SELECT '</span> <span style="color: #00F;">||</span>seq_name <span style="color: #00F;">||</span><span style="color: #F00;">'.NEXTVAL FROM dual'</span> <span style="color: #00F;">INTO</span> cval<span style="color: #00F;">;</span>
&nbsp;
  cval <span style="color: #00F;">:=</span> cval <span style="color: #00F;">-</span> startvalue <span style="color: #00F;">+</span> <span style="color: #800;">1</span><span style="color: #00F;">;</span>
&nbsp;
  <span style="color: #00F;">IF</span> cval <span style="color: #00F;">=</span> <span style="color: #800;">0</span> <span style="color: #00F;">THEN</span>
    <span style="color: #00F;">RETURN</span><span style="color: #00F;">;</span>
  <span style="color: #00F;">ELSIF</span> cval <span style="color: #00F;">&lt;</span> <span style="color: #800;">0</span> <span style="color: #00F;">THEN</span> 
    inc_by <span style="color: #00F;">:=</span> <span style="color: #F00;">' INCREMENT BY '</span> <span style="color: #00F;">||</span> <span style="color: #000;">ABS</span><span style="color: #00F;">&#40;</span>cval<span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
  <span style="color: #00F;">ELSE</span>
    inc_by <span style="color: #00F;">:=</span> <span style="color: #F00;">' INCREMENT BY -'</span> <span style="color: #00F;">||</span> cval<span style="color: #00F;">;</span>
  <span style="color: #00F;">END</span> <span style="color: #00F;">IF</span><span style="color: #00F;">;</span> 
&nbsp;
  <span style="color: #00F;">EXECUTE</span> <span style="color: #00F;">IMMEDIATE</span> <span style="color: #F00;">'ALTER SEQUENCE '</span> <span style="color: #00F;">||</span> seq_name <span style="color: #00F;">||</span> inc_by<span style="color: #00F;">;</span>
&nbsp;
  <span style="color: #00F;">EXECUTE</span> <span style="color: #00F;">IMMEDIATE</span> <span style="color: #F00;">'SELECT '</span> <span style="color: #00F;">||</span>seq_name <span style="color: #00F;">||</span><span style="color: #F00;">'.NEXTVAL FROM dual'</span> <span style="color: #00F;">INTO</span> cval<span style="color: #00F;">;</span>
&nbsp;
  <span style="color: #00F;">EXECUTE</span> <span style="color: #00F;">IMMEDIATE</span> <span style="color: #F00;">'ALTER SEQUENCE '</span> <span style="color: #00F;">||</span> seq_name <span style="color: #00F;">||</span> <span style="color: #F00;">' INCREMENT BY 1'</span><span style="color: #00F;">;</span>
&nbsp;
<span style="color: #00F;">END</span> reset_sequence<span style="color: #00F;">;</span>
<span style="color: #00F;">/</span>
&nbsp;
<span style="color: #00F;">CREATE</span> <span style="color: #00F;">OR</span> <span style="color: #000;">REPLACE</span> <span style="color: #00F;">PROCEDURE</span> reset_sequence_from_table <span style="color: #00F;">&#40;</span>
seq_name <span style="color: #00F;">IN</span> <span style="color: #00F;">VARCHAR2</span><span style="color: #00F;">,</span> column_name <span style="color: #00F;">IN</span> <span style="color: #00F;">VARCHAR2</span><span style="color: #00F;">,</span> table_name <span style="color: #00F;">IN</span> <span style="color: #00F;">VARCHAR2</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">AS</span>
&nbsp;
cval   <span style="color: #00F;">INTEGER</span><span style="color: #00F;">;</span>
&nbsp;
<span style="color: #00F;">BEGIN</span>
&nbsp;
  <span style="color: #00F;">EXECUTE</span> <span style="color: #00F;">IMMEDIATE</span> <span style="color: #F00;">'SELECT MAX('</span> <span style="color: #00F;">||</span> column_name <span style="color: #00F;">||</span><span style="color: #F00;">') FROM '</span> <span style="color: #00F;">||</span> table_name 
  <span style="color: #00F;">INTO</span> cval<span style="color: #00F;">;</span>
&nbsp;
  <span style="color: #00F;">IF</span> <span style="color: #00F;">&#40;</span>cval <span style="color: #00F;">IS</span> <span style="color: #00F;">NULL</span><span style="color: #00F;">&#41;</span> <span style="color: #00F;">THEN</span>
    cval <span style="color: #00F;">:=</span> <span style="color: #800;">1</span><span style="color: #00F;">;</span>
  <span style="color: #00F;">ELSE</span>
    cval <span style="color: #00F;">:=</span> cval <span style="color: #00F;">+</span> <span style="color: #800;">1</span><span style="color: #00F;">;</span>
  <span style="color: #00F;">END</span> <span style="color: #00F;">IF</span><span style="color: #00F;">;</span>
&nbsp;
  RESET_SEQUENCE<span style="color: #00F;">&#40;</span>seq_name<span style="color: #00F;">,</span> cval<span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
&nbsp;
<span style="color: #00F;">END</span> reset_sequence_from_table<span style="color: #00F;">;</span>
<span style="color: #00F;">/</span></pre></div></div>

<p>Setup some test data to verify the proc:</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;"><span style="color: #00F;">DROP</span> sequence mytable_seq<span style="color: #00F;">;</span>
<span style="color: #00F;">DROP</span> <span style="color: #00F;">TABLE</span> mytable<span style="color: #00F;">;</span>
&nbsp;
<span style="color: #00F;">CREATE</span> <span style="color: #00F;">TABLE</span> mytable <span style="color: #00F;">&#40;</span> id <span style="color: #00F;">NUMBER</span> <span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">CREATE</span> sequence mytable_seq<span style="color: #00F;">;</span>
&nbsp;
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">1</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">2</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">3</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">4</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">5</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">6</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">7</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">8</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">9</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
<span style="color: #00F;">INSERT</span> <span style="color: #00F;">INTO</span> mytable <span style="color: #00F;">VALUES</span> <span style="color: #00F;">&#40;</span><span style="color: #800;">10</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
&nbsp;
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span>
&nbsp;
<span style="color: #00F;">COMMIT</span><span style="color: #00F;">;</span></pre></div></div>

<p>A test:</p>

<div class="wp_syntax"><div class="code"><pre class="plsql" style="font-family:monospace;">exec reset_sequence_from_table<span style="color: #00F;">&#40;</span><span style="color: #F00;">'MYTABLE_SEQ'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'ID'</span><span style="color: #00F;">,</span> <span style="color: #F00;">'MYTABLE'</span><span style="color: #00F;">&#41;</span><span style="color: #00F;">;</span>
&nbsp;
<span style="color: #080; font-style: italic;">-- should return 11 because mytable has a record with id 10</span>
<span style="color: #00F;">SELECT</span> mytable_seq<span style="color: #00F;">.</span><span style="color: #00F;">NEXTVAL</span> <span style="color: #00F;">FROM</span> dual<span style="color: #00F;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.brianlow.com/index.php/2008/04/29/reset-sequence-from-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
