<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: compare code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 17 May 2008 13:10:06 GMT</pubDate>
    <description>DZone Snippets: compare code</description>
    <item>
      <title>Compare two bitmap objects</title>
      <link>http://snippets.dzone.com/posts/show/3883</link>
      <description>&lt;code&gt;&lt;br /&gt;        private bool PicsIdentical(Bitmap bmp1, Bitmap bmp2)&lt;br /&gt;        {&lt;br /&gt;            bool retVal = true;&lt;br /&gt;&lt;br /&gt;            if (bmp1.Size != bmp2.Size)&lt;br /&gt;                retVal = false;&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                for (int x = 0; x &lt; bmp1.Width; x++)&lt;br /&gt;                {&lt;br /&gt;                    for (int y = 0; y &lt; bmp1.Height; y++)&lt;br /&gt;                    {&lt;br /&gt;                        if (bmp1.GetPixel(x, y) != bmp2.GetPixel(x, y))&lt;br /&gt;                        {&lt;br /&gt;                            retVal = false;&lt;br /&gt;                            break;&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return retVal;&lt;br /&gt;        }&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 24 Apr 2007 22:34:24 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3883</guid>
      <author>mstampar (Miroslav Stampar)</author>
    </item>
    <item>
      <title>Is a value between two other values?</title>
      <link>http://snippets.dzone.com/posts/show/1607</link>
      <description>&lt;code&gt;&lt;br /&gt;between?: func [&lt;br /&gt;    value bound-1 bound-2&lt;br /&gt;    /exclusive&lt;br /&gt;    /local low-bound high-bound&lt;br /&gt;][&lt;br /&gt;    set [low-bound high-bound] sort reduce [bound-1 bound-2]&lt;br /&gt;    either exclusive [&lt;br /&gt;        all [(value &gt; low-bound) (value &lt; high-bound)]&lt;br /&gt;    ][&lt;br /&gt;        ;-- Inclusive comparison&lt;br /&gt;        all [(value &gt;= low-bound) (value &lt;= high-bound)]&lt;br /&gt;    ]&lt;br /&gt;]&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 01 Mar 2006 03:52:31 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1607</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
    <item>
      <title>Compare two files</title>
      <link>http://snippets.dzone.com/posts/show/1286</link>
      <description>&lt;code&gt;&lt;br /&gt;    compare: func [a b /binary] [&lt;br /&gt;        a: checksum either binary [read/binary a] [read a]&lt;br /&gt;        b: checksum either binary [read/binary b] [read b]&lt;br /&gt;        equal? a b&lt;br /&gt;    ]&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 23 Jan 2006 02:07:40 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1286</guid>
      <author>gregg.irwin (Gregg Irwin)</author>
    </item>
  </channel>
</rss>
