<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Rujith Anand's space</title>
  <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/" />
  <link rel="self" href="http://www.rujith.net/RujithBlogTech/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2010-09-01T08:13:46.0112438-07:00</updated>
  <author>
    <name>Rujith Anand</name>
  </author>
  <subtitle>The techie in me</subtitle>
  <id>http://www.rujith.net/RujithBlogTech/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>Finding duplicate records based on multiple columns in SQL</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2010/08/30/FindingDuplicateRecordsBasedOnMultipleColumnsInSQL.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,21d449c2-00fb-48b6-8ece-714c69180708.aspx</id>
    <published>2010-08-30T15:13:00-07:00</published>
    <updated>2010-09-01T08:13:46.0112438-07:00</updated>
    <category term="Database" label="Database" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Database.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Recently I was trying to find duplicate records in a table. The records are considered
duplicate if two columns in different records has the same value. For example if first
name and last name is same in record1 and record2, they considered as duplicate. 
</p>
        <p>
The below query will help to find the duplicate records. 
</p>
        <p>
SELECT fname, lname, COUNT(*) AS DuplicateCount FROM [Users]<br />
GROUP BY fname, lname HAVING COUNT(*) &gt; 1<br />
ORDER BY COUNT(*), fname. 
</p>
        <p>
  
</p>
        <p>
(I know this is pretty simple one, but most of the time you struggle for the simplest
query :) so thought of sharing it)
</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Quickest String.Replace case insensitive</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2010/04/10/QuickestStringReplaceCaseInsensitive.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,89973a28-1e94-41d2-9855-413aee325702.aspx</id>
    <published>2010-04-10T15:18:00-07:00</published>
    <updated>2010-04-16T08:19:28.3456275-07:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Coding.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
String.Replace is not case insensitive, so what is the best way to do it. There are
several ways, if I think of the quickest one it is using regex.
</p>
        <pre class="csharpcode">
          <span class="kwrd">using</span> System.Text.RegularExpressions;<span class="kwrd">string</span><span class="kwrd">string</span> str
= <span class="str">"The quick brown Fox jumps over the lazy dog"</span>; <span class="kwrd">string</span> strReplace
= <span class="str">"cat"</span>; <span class="kwrd">string</span> result = Regex.Replace(str, <span class="str">"fox"</span>,
strReplace, RegexOptions.IgnoreCase);</pre>
        <p>
-Rujith
</p>
        <p>
 
</p>
        <style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
      </div>
    </content>
  </entry>
  <entry>
    <title>Body onload and AJAX</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2010/02/08/BodyOnloadAndAJAX.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,6b8104a3-84b0-410c-b946-cac1cb8755ba.aspx</id>
    <published>2010-02-07T16:32:00-08:00</published>
    <updated>2010-02-19T08:31:04.8340115-08:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Coding.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I had lot of trouble in my last project due the html body onload event. The aspx pages
were relying lot on this event ( I agree its not the best way, but we don't have the
budget and time for to rebuild the entire site). These sites were AJAXyfied recently
using Telerik RadControls, and were not working in FireFox. I must admin Telerik controls
are really good, its makes your job very easy in AJAX world. Though I don't like their
quarterly release idea. YES, they release a new version every quarter... 
</p>
        <p>
So the problem in AJAX is, the page can be loaded asynchronously, so when the onload
event on the body is fired the controls may not be ready, so you get null exceptions. 
</p>
        <p>
The best way I found is to use the built in ‘pageLoad()’ method(this is a reserved
method). This will be called once all AJAX load events are finished. Remember you
can use this only in AJAX pages. Also this is consistent in different browsers. (If
you are going with FireFox you have to use window.load=function() instead onload=function())
</p>
        <p>
Coding is fun
</p>
        <p>
-Rujith
</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Change Request length in IIS 7</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2010/02/07/ChangeRequestLengthInIIS7.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,86152535-3c14-42da-939d-9d86384332a7.aspx</id>
    <published>2010-02-06T16:18:00-08:00</published>
    <updated>2010-02-19T08:18:25.7871365-08:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Coding.aspx" />
    <category term="WCF" label="WCF" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,WCF.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Maximum request length matters when you want to allow upload/download of large files.
</p>
        <p>
This is one of the major change in IIS7. In previous version the default is 4MB, in
IIS7 its 28.6MB. So when you deploy your ASP.NET application you will see that it
will work for files larger than 4MB, but will give as soon as you cross the 28MB.
</p>
        <p>
In IIS 7, the attribute has been changed to maxAllowedContentLength and it has to
appear in &lt;system.webServer&gt; section (as for all IIS 7 settings). The complete
attribute will look something like this…
</p>
        <pre class="code">
          <span style="color: blue">&lt;</span>
          <span style="color: #a31515">system.webServer</span>
          <span style="color: blue">&gt;</span>
          <span style="color: blue">
            <br />
&lt;</span>
          <span style="color: #a31515">security </span>
          <span style="color: blue">&gt;
&lt;</span>
          <span style="color: #a31515">requestFiltering</span>
          <span style="color: blue">&gt;
&lt;</span>
          <span style="color: #a31515">requestLimits </span>
          <span style="color: red">maxAllowedContentLength</span>
          <span style="color: blue">=</span>"<span style="color: blue">3072000000</span>" <span style="color: blue">/&gt;
&lt;/</span><span style="color: #a31515">requestFiltering</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">security</span><span style="color: blue">&gt;</span></pre>
        <p>
…
</p>
        <p>
 
</p>
        <p>
          <a href="http://11011.net/software/vspaste">
          </a>
        </p>
      </div>
    </content>
  </entry>
  <entry>
    <title>WCF Security Guidance</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2010/01/12/WCFSecurityGuidance.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,26bcb1da-bfce-4c26-b5b5-240e7d32e3ef.aspx</id>
    <published>2010-01-12T11:50:00-08:00</published>
    <updated>2010-02-11T03:50:27.2661804-08:00</updated>
    <category term="WCF" label="WCF" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,WCF.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
I ran into trouble during deploying a WCF service on IIS7 with https.
</p>
        <p>
There's a great resource on all things WCF Security related here
</p>
        <p>
          <a title="http://www.codeplex.com/WCFSecurity" href="http://www.codeplex.com/WCFSecurity">http://www.codeplex.com/WCFSecurity</a>
        </p>
        <p>
This helped me a lot.
</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Exporting Active Directory attributes</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2010/01/10/ExportingActiveDirectoryAttributes.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,63430cde-d51d-4c82-8a67-3ec0498ddb27.aspx</id>
    <published>2010-01-10T14:23:00-08:00</published>
    <updated>2010-01-11T06:24:30.2905068-08:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Coding.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
When you are working with Active Directory the following may be useful,
</p>
        <p>
Import and export directory objects – <a href="http://www.computerperformance.co.uk/Logon/Logon_CSVDE_Home.htm" target="_blank">CSVDE</a> &amp; <a href="http://www.computerperformance.co.uk/Logon/Logon_LDIF.htm" target="_blank">LDIFDE</a><br />
ex: from the command prompt try CSVDE -f C:\Exportfile.csv<br />
more help is available in <a href="http://support.microsoft.com/kb/237677" target="_blank">this
KB article</a>.
</p>
        <p>
Another useful utility while working with Active directory and LDAP(Light Weight Directory
Access Protocol) is <a href="http://technet.microsoft.com/en-us/library/cc773354(WS.10).aspx" target="_blank">ADSI
Edit (adsiedit.msc)</a>. <a href="http://www.computerperformance.co.uk/w2k3/utilities/adsi_edit.htm" target="_blank">Nice
link</a> if you want to know in detail.
</p>
        <p>
Also found this interesting link with attributes and its description for AD Users. <a href="http://www.winzero.ca/Active-Directory-users.htm" target="_blank">see
here</a>. And check <a href="http://halfloaded.com/blog/list-all-user-object-attributes-in-active-directory-schema-whew/" target="_blank">this
script</a> to list all User object attributes in active directory schema.
</p>
      </div>
    </content>
  </entry>
  <entry>
    <title>System.Data.OracleClient is dying</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2009/12/04/SystemDataOracleClientIsDying.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,a1b30200-8959-4137-9419-caf961428798.aspx</id>
    <published>2009-12-04T07:58:00-08:00</published>
    <updated>2009-12-04T01:59:38.3050541-08:00</updated>
    <category term="Coding" label="Coding" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Coding.aspx" />
    <category term="Database" label="Database" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Database.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
ADO.NET data provider for Oracle is dying. ADO.NET team has decided to kill(deprecate)
it in .NET 4.0. How sad isn’t it? Read more about the story on <a href="http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx" target="_blank">ADO.NET
team blog</a></p>
        <p>
Though sometimes I feel its unnecessary to have a duplicate copy of Oracle data provider.
Most of the people use ODP.NET or some other third party client. Nice comparison <a href="http://msdn.microsoft.com/en-us/library/ms971518.aspx" target="_blank">here</a> (and
that is why people don’t use .NET Oracle client :))
</p>
        <p>
One very bad thing I noticed about these providers is both of them need Oracle client
installed. For the MS provider(System.Data.OracleClient) the minimum requirement is
Oracle 8i Release 3 (8.1.7) Client or later. Check the requirement in detail here <a href="http://msdn.microsoft.com/en-us/library/2d7h4ycx.aspx" target="_blank">System
Requirements (Oracle).</a><br />
For the ODP.NET Oracle client version 9.2 or later.
</p>
        <p>
Its not always possible to install a large application like Oracle client in some
scenario, so there is an alternative without installing the Oracle client, use <a href="http://www.oracle.com/technology/tech/oci/instantclient/index.html" target="_blank">Oracle
Database Instant Client</a>. Just put Oracle Instant Client in the same folder as
your executable file.
</p>
        <p>
-Rujith
</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:214bbe38-79b4-4114-940b-6a47b3b45a2d" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/Oracle" rel="tag">Oracle</a>,<a href="http://technorati.com/tags/ADO.NET" rel="tag">ADO.NET</a>,<a href="http://technorati.com/tags/Oracle+Data+Client" rel="tag">Oracle
Data Client</a>,<a href="http://technorati.com/tags/Oracle+Instant+client" rel="tag">Oracle
Instant client</a></div>
      </div>
    </content>
  </entry>
  <entry>
    <title>Going back to basics&amp;hellip;</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2009/11/23/GoingBackToBasicshellip.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,91d5fff8-299e-4285-9b9f-7fca352d3a0e.aspx</id>
    <published>2009-11-23T10:13:17.232973-08:00</published>
    <updated>2009-11-24T01:57:36.5461072-08:00</updated>
    <category term="Everything" label="Everything" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Everything.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Nine Options for Managing Persistent User State in Your ASP.NET Application… one of
the basic things to learn when you start ASP.NET training… :) I am forgetting simple
things… 
</p>
        <p>
  
</p>
        <p>
so the methods are
</p>
        <ol>
          <li>
Application 
</li>
          <li>
Cookies 
</li>
          <li>
Form Post / Hidden Form Field 
</li>
          <li>
Query String 
</li>
          <li>
Session 
</li>
          <li>
New State Containers in ASP.NET 
</li>
          <li>
Cache 
</li>
          <li>
Context 
</li>
          <li>
ViewState 
</li>
          <li>
Web.config and Machine.config Files 
</li>
          <li>
Profile (ASP.NET 2.0) ??</li>
        </ol>
        <p>
more details are on <a href="http://msdn.microsoft.com/en-us/magazine/cc300437.aspx" target="_blank">MSDN</a></p>
        <p>
 
</p>
        <p>
        </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:c11a68db-962b-4a91-9bee-6d61bb323c97" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/Persisting+User+state" rel="tag">Persisting
User state</a></div>
      </div>
    </content>
  </entry>
  <entry>
    <title>Patterns and Practices for Distributed Teams</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2009/11/23/PatternsAndPracticesForDistributedTeams.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,56c6f8b8-5b79-4619-9eea-0d35422e3b29.aspx</id>
    <published>2009-11-22T17:32:00-08:00</published>
    <updated>2009-11-23T09:34:01.6927064-08:00</updated>
    <category term="Everything" label="Everything" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Everything.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Found this interesting post <a href="http://blogs.msdn.com/jmeier/archive/2009/11/23/patterns-and-practices-for-distributed-teams.aspx" target="_blank">here</a>…
</p>
        <p>
I am sure all of us (s/w fellows) must have come across so called ‘distributed team’…
nice point to note… 
</p>
        <p>
-Rujith
</p>
        <p>
        </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:45922b5f-3835-49ba-a5a4-78e4dd8220ed" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/Distributed+Teams" rel="tag">Distributed
Teams</a></div>
      </div>
    </content>
  </entry>
  <entry>
    <title>WCF configuration schema is complicated !</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2009/11/10/WCFConfigurationSchemaIsComplicated.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,2fff7885-a97a-474e-a703-72e534a50cdb.aspx</id>
    <published>2009-11-10T06:58:17.6276839-08:00</published>
    <updated>2009-11-10T06:58:17.6276839-08:00</updated>
    <category term="WCF" label="WCF" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,WCF.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
See how you can things more complicated… <a href="http://msdn.microsoft.com/en-us/library/ms731734.aspx" target="_blank">click
here</a>… 
</p>
        <p>
 
</p>
        <p>
and how you can make things simpler… <a href="http://winterdom.com/2007/02/wcfconfigurationcomplexity" target="_blank">here</a></p>
      </div>
    </content>
  </entry>
  <entry>
    <title>Project plan Gantt Chart using Excel 2007</title>
    <link rel="alternate" type="text/html" href="http://www.rujith.net/RujithBlogTech/2009/09/26/ProjectPlanGanttChartUsingExcel2007.aspx" />
    <id>http://www.rujith.net/RujithBlogTech/PermaLink,guid,5a258ad2-645d-4612-bd6d-dc1113ec4f08.aspx</id>
    <published>2009-09-26T11:29:00-07:00</published>
    <updated>2010-09-01T01:34:08.9134394-07:00</updated>
    <category term="Office" label="Office" scheme="http://www.rujith.net/RujithBlogTech/CategoryView,category,Office.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
For my new project I had to create a plan, I guess all the project managers need one…
and the best way to represent the plan is in Gantt chart. So that your boss will know
when each milestone will be achieved in the timeline.<br />
I searched in the web for free Gantt chart tools and couldn’t find any good ones,
and we didn't had budget to buy one. 
</p>
        <p>
Then I decided to use the almighty excel to create one. It was very easy to create
one, excel support charts, what else you need. Excel is really powerful isn't it..I
remember when I used to share accommodation with my friends I used excel spreadsheet
to calculate our common expenses, though some of them argue there is mistake in the
formula they are paying more :)
</p>
        <p>
So to cut the crap out, the Excel Project Plan Gantt chart is available <a title="Project plan Gantt chart in Excel" href="http://www.rujith.net/RujithBlogTech/content/binary/ExcelGanttchart.zip" target="_blank">here</a> for
download. In short the features include<br />
1. Gantt chart of the project plan<br />
2. Need only minimal inputs(project start date, tasks and task estimates)<br />
3. The formula takes care of Weekends(NOT holidays) while calculating dates.<br />
3. Fully customizable. you are free to change the formula to suit your purpose. you
can even convert it into an excel template Gantt chart if you like.
</p>
        <p>
Rest you can see yourself in the spreadsheet.
</p>
        <p>
Please feel free to leave your comments and suggestions in this blog. 
</p>
        <p>
Some of the references I have used are below
</p>
        <p>
1. Using Excel to Create a Gantt Chart by Michele McDonough<br /><a title="http://www.brighthub.com/office/project-management/articles/3418.aspx" href="http://www.brighthub.com/office/project-management/articles/3418.aspx">http://www.brighthub.com/office/project-management/articles/3418.aspx</a></p>
        <p>
2. and of course office online excel help
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:04277ed2-2f67-44fa-8d9c-36c5f0d438f7" class="wlWriterEditableSmartContent">
          <p>
Excel spreadsheet Project plan with Gantt Chart can be <a href="http://www.rujith.net/RujithBlogTech/content/binary/ExcelGanttchart.zip" target="_blank">Download
here</a></p>
        </div>
        <p>
        </p>
        <p>
-Rujith
</p>
        <p>
        </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:37df8426-e22c-4997-925f-42e04ab45895" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/Project+plan" rel="tag">Project plan</a>,<a href="http://technorati.com/tags/Gantt+Chart" rel="tag">Gantt
Chart</a>,<a href="http://technorati.com/tags/Excel+2007" rel="tag">Excel 2007</a>,<a href="http://technorati.com/tags/Gantt+chart+in+Excel+2007" rel="tag">Gantt
chart in Excel 2007</a></div>
        <a href="http://www.rujith.net/RujithBlogTech/content/binary/ExcelGanttchart.zip">ExcelGanttchart.zip
(18.01 KB)</a>
      </div>
    </content>
  </entry>
</feed>