Monday, May 28, 2007

 

W3Counter shows FireFox hits 25%

According to W3Counter.com, a free web tracker spread across over 4300 sites, the FireFox browser has reached 25% market share.

Spread between FireFox 2.0 (14.47%), FireFox 1.5 (9.10%) and FireFox 1.0 (1.25%), it vastly outperformed all but Internet Explorer, which is seeing diminishing use.

Opera saw a disappointing market share of 1.28%, even falling below Safaria 2.0 with 1.94%, despite its significantly larger potential install base.

Despite poor performance from Internet Explorer, Microsoft still sit pretty in the OS category, with a total of 93.50% market coverage across all of its versions.

Windows XP remained a very strong 1st, with 84.47% of the market.

Apple Mac OSX held on to 3rd position with 3.87% of the market, sandwiched between Windows 2000 in 2nd and Windows Vista in 4th.

Sadly for Linux it could not beat Windows 98 into the top five, with Linux in 6th having 1.21% coverage compared to Windows 98 in 5th with 1.55%. Clearly there is some bias given that Linux servers are not necessarily used for browsing.

http://www.w3counter.com/globalstats.php?date=2007-05-20

 

Creating a thread in C# - no nonsense code

There seem to be a lot of the more complicated C# threading tutorials out there, but I was more interested in the bare minimum that I can then build on the way I like. Here is a code sample to start a thread with a button on a form that will display a Hello message box every minute until the button is clicked again. To use the code, copy the functions to your class and adapt as needed.

using System.Threading;

public partial class Form1 : Form
{
Thread m_thread = null;

// Static method that we call threaded
public static void ThreadFunc()
{
while (true)
{
System.Windows.Forms.MessageBox.Show("Hello");
Thread.Sleep(60 * 1000); // wait 1 minute
}
}

// Event when we click our button
private void butStart_Click(object sender, EventArgs e)
{
if (m_thread == null)
{
m_thread = new Thread(new ThreadStart(ThreadFunc));
m_thread.Start();
}
else
{
m_thread.Abort();
m_thread = null;
}
}
}

 

Sending SMTP Email in C# - .NET 1.x and .2.0

Microsoft, at least with software development, have a tendency to be reasonably consistent, which is why I was surprised recently that the class structure of .NET 1.x and 2.0 have changed somewhat.

Code for sending email, .NET 1.1:

using System.Web.Util;
MailMessage mail = new MailMessage("from@addr.com", "to@addr.com",
"My subject", "Text body");
SmtpMail smtp("relay.server.com");
string res = SmtpMail.Send(mail);

Code for sendmail email, .NET 2.0:

using System.Net.Mail;
MailMessage mail = new MailMessage("from@addr.com", "to@addr.com",
"My subject", "Text body");
SmtpClient smtp("relay.server.com");
string res = smtp.Send(mail);

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]