• You give a team of people a set of objectives and goals and get them all to buy into it, and they can move mountains
• Aim high and put your heart into it.
• What's important is trying to be the best and working to get there. And that's how you fulfil your potential.
• I'm putting my hand up and saying, 'Able body, ready to work. I can scrub floors to address big issues.
• Work for the right person. Work for a company that wants you to succeed. Don't play politics and just focus on the job at hand
• Take a stand. Be known for your courage and confidence.
Sunday, March 4, 2012
Friday, October 30, 2009
ExtJS GridPanel autoExpandColumn issue with IE
Issue: In Internet Explorer the column set to autoExpand will go beyond the page width. The Grid will not fit into browser
Solution: Change the attribute in the CSS file:
File Name: ext\resources\css\ext-all.css
Code change:
Original: .x-grid3-header-offset{padding-left:1px;width:10000px}
Code fix: .x-grid3-header-offset{padding-left:1px;width:auto}
Solution: Change the attribute in the CSS file:
File Name: ext\resources\css\ext-all.css
Code change:
Original: .x-grid3-header-offset{padding-left:1px;width:10000px}
Code fix: .x-grid3-header-offset{padding-left:1px;width:auto}
Monday, October 19, 2009
Aggregation with String in SQL Server
The following code will do the similar functionality of a amount column summation for String data (String concatenation)
SELECT DISTINCT Author, Titles
FROM (select Title, Author from BookStore) a
CROSS APPLY ( SELECT Title + ' '
FROM (select Title, Author from BookStore) b
WHERE a.Author = b.Author
ORDER BY Author
FOR XML PATH('') ) D ( Titles )
SELECT DISTINCT Author, Titles
FROM (select Title, Author from BookStore) a
CROSS APPLY ( SELECT Title + ' '
FROM (select Title, Author from BookStore) b
WHERE a.Author = b.Author
ORDER BY Author
FOR XML PATH('') ) D ( Titles )
Reading large XML File
Here is the code for reading large XML file, this code works faster than opening the file in any other application.
XmlTextReader xtrInput;
XmlDocument xdItem;
xtrInput = new XmlTextReader("sample.xml");
int i = 0;
while(xtrInput.Read())
{
while (xtrInput.NodeType == XmlNodeType.Element && xtrInput.Name.ToLower() == "record")
{
i = i + 1;
xdItem = new XmlDocument();
xdItem.LoadXml(xtrInput.ReadOuterXml());
xdItem.Save("file" + i.ToString() + ".xml");
}
}
xtrInput.Close();
XmlTextReader xtrInput;
XmlDocument xdItem;
xtrInput = new XmlTextReader("sample.xml");
int i = 0;
while(xtrInput.Read())
{
while (xtrInput.NodeType == XmlNodeType.Element && xtrInput.Name.ToLower() == "record")
{
i = i + 1;
xdItem = new XmlDocument();
xdItem.LoadXml(xtrInput.ReadOuterXml());
xdItem.Save("file" + i.ToString() + ".xml");
}
}
xtrInput.Close();
Monday, June 8, 2009
Error registering COM+ dll using Regsvcs.exe
“Could not load file or assembly System.IO.FileNotFoundException”
This error happens due to various reasons. The first solution that you will find for this issue is, “Copy all the dependency files to the destination server and register the dll”. This seems to be an easy fix, hence we miss this solution by oversight. Do not go by an understanding that target machine has the similar environment as our development machine and there is not need to copy the dependencies. Dependencies need not be the framework dll, it can also be any specific dll created for this process. In such case copy the latest of that dlls to the bin folder of the solution and build the code. Copy the latest build and the dependency dlls to the target machine and register the dll.
There may be other reasons for which you may receive this error. Information about the same are available in the following link.
http://blogs.msdn.com/dougste/archive/2006/09/05/741329.aspx
Additional information on COM+ registration
http://social.msdn.microsoft.com/Forums/en-US/netfxremoting/thread/343e7086-8b24-4314-ad5a-4115dfaadce0
This error happens due to various reasons. The first solution that you will find for this issue is, “Copy all the dependency files to the destination server and register the dll”. This seems to be an easy fix, hence we miss this solution by oversight. Do not go by an understanding that target machine has the similar environment as our development machine and there is not need to copy the dependencies. Dependencies need not be the framework dll, it can also be any specific dll created for this process. In such case copy the latest of that dlls to the bin folder of the solution and build the code. Copy the latest build and the dependency dlls to the target machine and register the dll.
There may be other reasons for which you may receive this error. Information about the same are available in the following link.
http://blogs.msdn.com/dougste/archive/2006/09/05/741329.aspx
Additional information on COM+ registration
http://social.msdn.microsoft.com/Forums/en-US/netfxremoting/thread/343e7086-8b24-4314-ad5a-4115dfaadce0
Monday, April 13, 2009
WMI - Failed to connect
WMI (Windows Management instrumentation) service had been an issue recently in most of the installation like SQL Server 2005, SQL BPA etc. There are many solutions provided on the net, having tried almost all, only the following worked at last - Rebuilding WMI
Comprehensive rebuild methodImportant note:
If you've installed a Service Pack, you need to insert your Windows XP CD with Service Pack integration (called as the Slipstreamed Windows XP CD). If you don't have one, you may point to the %Windir%\ServicePackFiles\i386 folder for a recent version of the system files required during WMI repair. Or you may create a slipstreamed Windows XP CD and insert it when prompted.
Click Start, Run and type the following command, and press ENTER:
Comprehensive rebuild methodImportant note:
If you've installed a Service Pack, you need to insert your Windows XP CD with Service Pack integration (called as the Slipstreamed Windows XP CD). If you don't have one, you may point to the %Windir%\ServicePackFiles\i386 folder for a recent version of the system files required during WMI repair. Or you may create a slipstreamed Windows XP CD and insert it when prompted.
Click Start, Run and type the following command, and press ENTER:
rundll32.exe setupapi,InstallHinfSection WBEM 132
%windir%\inf\wbemoc.inf
Insert your Windows XP CD into the drive when prompted. Repair process should take few minutes to complete. Then restart Windows for the changes to take effect.
Note: Do not copy wmiprvse.exe while rebuilding. Remove this file from the %Windir%\ServicePackFiles\i386 folder, if exists, then start rebuilding. This file will cause CPU spike.
Reference: http://windowsxp.mvps.org/repairwmi.htm
Tuesday, January 20, 2009
First level of Performance Tuning in SQL Server
A Simple way to performance tune your query:
a) Check if the WHERE clause is using INDEX or FULL TABLE scan using query plan
b) Ensure the columns used in WHERE clause is in the order of the index creation (if applicable)
c) Include the WHERE condition that would limit the number of records to be searched and then the JOIN condition
Recently I have created a query which took nearly 4 minutes to get executed. I did the following changes, which made my query get executed in 2 minutes.
(I have changed the table names for this sample)
Initial Query:
SELECTFROM Employee empINNER JOIN Address adr ON emp.EmpID = adr.EmpIDLEFT OUTER JOIN Phone ph ON emp.EmpID = ph.EmpIDLEFT OUTER JOIN FamilyMembers fly ON emp.EmpID = fly.EmpIDLEFT OUTER JOIN BankDet bk ON emp.EmpID = bk.EmpID
I commented all the JOINs and uncommented each JOINs and verified the execution time. Only for Phone it took more time. Hence I moved the JOIN condition for Phone at the end of the JOINs. This limited the records to be processed for the Phone table and reduced the timing.
Tuned Query:
SELECTFROM Employee empINNER JOIN Address adr ON emp.EmpID = adr.EmpIDLEFT OUTER JOIN FamilyMembers fly ON emp.EmpID = fly.EmpIDLEFT OUTER JOIN BankDet bk ON emp.EmpID = bk.EmpIDLEFT OUTER JOIN Phone ph ON emp.EmpID = ph.EmpID
a) Check if the WHERE clause is using INDEX or FULL TABLE scan using query plan
b) Ensure the columns used in WHERE clause is in the order of the index creation (if applicable)
c) Include the WHERE condition that would limit the number of records to be searched and then the JOIN condition
Recently I have created a query which took nearly 4 minutes to get executed. I did the following changes, which made my query get executed in 2 minutes.
(I have changed the table names for this sample)
Initial Query:
SELECT
I commented all the JOINs and uncommented each JOINs and verified the execution time. Only for Phone it took more time. Hence I moved the JOIN condition for Phone at the end of the JOINs. This limited the records to be processed for the Phone table and reduced the timing.
Tuned Query:
SELECT
Subscribe to:
Posts (Atom)