Find Factors of Given Number

Here is the C# Solution to find the factors of given number:

- To improve the Performance of finding Factors of a given Odd number, we can increment i in the for loop by 2 instead of 1.

 public List findFactors(int n)
        {
            List factors = new List();

            int max = Convert.ToInt32(Math.Sqrt(n));

            for (int i = 1; i <= max; i++)
            {
                if(n % i == 0)
                {
                    factors.Add(i);
                    if(i != max) // add square-root factors only once.
                        factors.Add(n/i);
                }
            }
            return factors;
        }

Tabs using JQuery

For Live Demo: Click here

CSS Code:

*{margin:0; padding: 0;}

body{
	margin: 0px;
	font-family: verdana;
	font-size: 12px;
	color: #ddd;
	line-height: 20px;
}

h2{
	font-size: 18px;
	font-weight: normal;
	color:#333;
	padding: 0 0 5px 0;
}

h3{
	font-size: 16px;
	font-weight: normal;
	color:#aaa;
	padding: 0 0 5px 0;
}

#wrapper{
	width: 600px;
	margin: 0px auto;
	padding: 15px;
}

ul{
	list-style: none;
}

li{
	display:inline;
	font-size: 14px;
	background-color: #ccc;
}
/*
li:first-child
{
	padding-left: 0px !important;
}
*/

li a{
	text-decoration: none;
	color: #333;
	padding: 5px 10px;
	background-color: #ccc;
	
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}

li a:hover{
	color:#ccc;
	background-color: #666;
}

.selected{
	color:#ddd;
	background-color: #333;
	font-weight: bold;
	
	padding:8px 15px 5px 15px;
}

#content div,
#content2 div{
	margin-top: 2px;
	padding: 15px;
	background-color: #333;
	
	border-top: 4px solid #666;
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
}

Find Empty Elements using JQuery

Following is the code to find empty elements from the webpage:

JQuery code:

$('*').each(function(){
if($(this).text() == ""){
//Empty Element found..!
}
});

Internet explorer 9 RC available for download

Click Here to Download IE 9 RC.
Microsoft IE 9 RC

Features:

Arrow using CSS

For Live Demo: Click here

CSS Code:

body { margin:0px auto;}

#content{margin:0px auto; width:200px;}

#arrow-top
{
	width:0px;
	height: 0px;
	
	border-bottom: 30px solid #999;
	border-left: 30px solid transparent;
	border-right: 30px solid transparent;
}

#arrow-right
{
	width:0px;
	height: 0px;
	
	border-top: 30px solid transparent;
	border-bottom: 30px solid transparent;
	border-left: 30px solid #777;	
}

#arrow-bottom
{
	width:0px;
	height: 0px;
	
	border-top: 30px solid #444;
	border-left: 30px solid transparent;
	border-right: 30px solid transparent;
}

#arrow-left
{
	width:0px;
	height: 0px;
	
	border-top: 30px solid transparent;
	border-bottom: 30px solid transparent;
	border-right: 30px solid #000;	
}