Tuesday, December 11, 2012

How to make inner float div inside the outer div

When you put some float div inside another div, The outer div will collapse in other words the size of dimension the outer div will small than the inner float div.

The solution is append a div with clear and block style in the end of the other float inner div as below:
<div id="outer_div">
    <div class="float-style">Item 1</div>
    <div class="float-style">Item 2</div>
    <div class="float-style">Item 3</div>
    <div style="clear:both;display:block;"></div>
</div>

Solution 2: using overflow:auto; in the outer div style can also prevent outer div collapsed. But this method may cause outer div appear scroll bar when new div adding to it.
<div id="outer_div" style="overflow:auto;">
    <div class="float-style">Item 1</div>
    <div class="float-style">Item 2</div>
    <div class="float-style">Item 3</div>
    <div style="clear:both;"></div>
</div>


related link: http://css-tricks.com/all-about-floats/

Friday, November 23, 2012

Create log off message for Windows



  1. Click Start > Run, type “regedit” click Ok button. Registry Editor window will popup.
  2. Find this path from left side of Registry Editor window: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  3. Double click LegalNoticeCaption from right side Registry Editor window. This will popup Edit String window. Type in Value data any name that you want to be your message window title. Click Ok button.
  4. Double click LegalNoticeText from right side Registry Editor window. This will popup Edit String window. Type in Value data any message, this message will show up on your message window. Click Ok button. Close your Registry Editor window.
  5. Log off from your computer.


Wednesday, November 7, 2012

How to check which process using TCP/IP Ports in Windows


Run the following command from a command prompt to find the PID of the process which is using TCP port 80 and/or 443. 
   
    netstat -aon | find ":80" 

    netstat -aon | find ":443"

You will see an output similar to the following. Remember the actual PID will vary from case to case.
    TCP    0.0.0.0:80    0.0.0.0:0    LISTENING    3604 
    TCP    0.0.0.0:443   0.0.0.0:0    LISTENING    3320

Now using Task Manager you can easily find out to which process the above PID belongs and take appropriate action.

http://support.microsoft.com/kb/973094

Friday, July 13, 2012

GDI+ .NET Color & HatchStyle Chart

Color Chart

HatchStyle Chart

Tuesday, July 10, 2012

Page Layout Using DIV


100% height and scroll able div

<html>
  <body style="overflow:hidden;">
    <div style="overflow:auto; position:absolute; top: 0px; left:0px; right:0px; bottom:0px">
    </div>
  </body>
</html>


Fix height header and footer and scroll able main content

<html>
  <body style="overflow:hidden;">
      <div id="header" style="overflow:hidden; position:absolute; top:0; left:0; height:50px;"><div>
      <div id="leftNav" style="overflow:auto; position:absolute; top:50px; left:0px; right:200px; bottom:50px;"></div>
      <div id="mainContent" style="overflow:auto; position:absolute; top:50px; left: 200px; right:0px; bottom:50px;"></div>
      <div id="footer" style="overflow:hidden; position:absolute; bottom:0; left:0; height:50px"></div>
  </body>
</html>

Note: for IE the main content div require doctype definition, without this the div height will not expand to the bottom position.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Tuesday, June 19, 2012

SQL Server version information



SQL Server 2012 version information

The following table lists the major releases of SQL Server 2012.
ReleaseProduct Version
SQL Server 2012 Service Pack 111.00.3000.00
SQL Server 2012 RTM11.00.2100.60


SQL Server 2008 R2 version information

The following table lists the major releases of SQL Server 2008 R2.

ReleaseProduct version
SQL Server 2008 R2 Service Pack 210.50.4000.0
SQL Server 2008 R2 Service Pack 110.50.2500.0
SQL Server 2008 R2 RTM10.50.1600.1
For more information information about the latest service packs for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
2527041  How to obtain the latest service pack for SQL Server 2008 R2
For more information about the latest cumulative updates available for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:
981356  The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released
2567616  The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 1 was released


SQL Server 2008 version information

The following table lists the major releases of SQL Server 2008.
ReleaseProduct version
SQL Server 2008 Service Pack 310.00.5500.00
SQL Server 2008 Service Pack 210.00.4000.00
SQL Server 2008 Service Pack 110.00.2531.00
SQL Server 2008 RTM10.00.1600.22
For more information information about the latest service packs for SQL Server 2008, click the following article number to view the article in the Microsoft Knowledge Base:
968382  How to obtain the latest service pack for SQL Server 2008
For more information about the latest cumulative updates available for SQL Server 2008, click the following article numbers to view the articles in the Microsoft Knowledge Base:
956909  The SQL Server 2008 builds that were released after SQL Server 2008 was released
970365  The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was released
2402659  The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 2 was released
2629969  The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released


SQL Server 2005 version information

The following table lists the major releases of SQL Server 2005.
ReleaseProduct version
SQL Server 2005 Service Pack 49.00.5000.00
SQL Server 2005 ServicePack 39.00.4035
SQL Server 2005 Service Pack 29.00.3042
SQL Server 2005 Service Pack 19.00.2047
SQL Server 2005 RTM9.00.1399


For more information information about the latest service packs for SQL Server 2005, click the following article number to view the article in the Microsoft Knowledge Base:
913089 How to obtain the latest service pack for SQL Server 2005

For more information about the latest cumulative updates available for SQL Server 2005, click the following article number to view the article in the Microsoft Knowledge Base:
937137 The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 2 was released
960598 The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 3 was released
2485757 The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 4 was released

SQL Server 2000 version information

The following table lists version number of the Sqlservr.exe file. 


ReleaseProduct version
SQL Server 2000 Service Pack 48.00.2039
SQL Server 2000 ServicePack 3a8.00.760
SQL Server 2000 Service Pack 38.00.760
SQL Server 2000 Service Pack 28.00.534
SQL Server 2000 Service Pack 18.00.384
SQL Server 2000 RTM8.00.194
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
290211  How to obtain the latest SQL Server 2000 service pack



Older versions of SQL Server

SQL Server 7.0

Use the version number in the following table to identify the product or service pack level: 
Version numberService pack
7.00.1063SQL Server 7.0 Service Pack 4
7.00.961SQL Server 7.0 Service Pack 3
7.00.842SQL Server 7.0 Service Pack 2
7.00.699SQL Server 7.0 Service Pack 1
7.00.623SQL Server 7.0 RTM
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
301511  How to obtain the latest SQL Server 7.0 service pack



SQL Server 6.5

Use the version number in the following table to identify the product or service pack level: 
Version numberService pack
6.50.479SQL Server 6.5 Service Pack 5a Update
6.50.416SQL Server 6.5 Service Pack 5a
6.50.415SQL Server 6.5 Service Pack 5
6.50.281SQL Server 6.5 Service Pack 4
6.50.258SQL Server 6.5 Service Pack 3
6.50.240SQL Server 6.5 Service Pack 2
6.50.213SQL Server 6.5 Service Pack 1
6.50.201SQL Server 6.5 RTM
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
273914  Readme.txt for SQL Server 6.5 post-Service Pack 5a Update




For more information: http://support.microsoft.com/kb/321185