Sunday, July 20, 2008

Version 0.6 of NGChart

New version of NGChart library supports QR codes.

From Google Chart API docs:
QR Codes are a popular type of two-dimensional barcode, which are also known as hardlinks or physical world hyperlinks. QR Codes store text which can be a hyperlink, contact information, telephone number, even whole verses of poems!

This is how encoded "Hello world" message looks like:
QR Codes sample image


C# code for the image:


QRCodes chart = new QRCodes(new ChartSize(150, 150), "Hello world");


Labels: , , , , , , , ,

Sunday, December 09, 2007

Updated NGChart library (.NET wrapper for Google Chart API)

NGChart was updated with the new features:

Bar charts

Pie charts with labels

Chart title

And the project wiki now has Samples page.

Labels: , , , , , , , , ,

Friday, December 07, 2007

.NET wrapper for Google Chart API

As you may know, Google created a simple and easy way to dynamically generate charts to use in web projects with the new Google Chart API.

I started a project to wrap the library to simplify usage of it in .NET projects.

As example - say, you need to visually compare two line charts:

Chart chart = new Chart(ChartType.Line,
                          new ChartSize(200, 125),
                          new ChartData(new int[][]
                                            {
                                                new int[] { 0, 1, 25, 26, 51, 52, 61, 1 },
                                                new int[] {7, 12, 60, 57, 4}
                                         }),
                          new Color[] { Color.DodgerBlue, Color.Gainsboro });
return chart.ToString();

It will generate the following url:

http://chart.apis.google.com/chart?cht=lc&chs=200x125&chd=s:ABZaz09B,HM85E&chco=1E90FFFF,DCDCDCFF

And the generated url shows the following chart:

Generated chart

Labels: , , , , , , , ,

Sunday, September 16, 2007

Dell laptop and microphone problems

Suddenly, mic stopped working in my Inspiron 6400 Dell laptop. All audio devices are from SigmaTel, and non of my actions (like, turn on Microphone boost) did not help.

The soluiton I found - Go to Control Panel and Open SigmaTel Audio applet. It contains a single checkbox Allow reconfiguration Pop-Ups. You should check the box, and re-insert the microphone. You should see Audio System Event: "The system has detected an audion device connection event." Choose Microphone there and hit Ok.

 

Monday, August 27, 2007

Anonymous identification in ASP.NET 2.0 (nitpicking)

MSDN page on HttpRequest.AnonymousID says that the generated anonymous ID can be changed in AnonymousIdentification_OnCreate handler. But in reality you should use AnonymousIdentification_Creating handler (as it said in MSDN page on AnonymousIdentificationEventArgs class).

Labels: , , ,

Saturday, August 18, 2007

System disk cleanup (part 1)

Once a month I run out of free space at disk C: and everytime it's harder and harder to find what is safe to delete. I decided to create a list of temporary stuff which is safe to delete, and a list of utilities I'm using.

Before you start to delete files -  it's a good idea to find out first who ate all the disk space. So you'll be sure you concentrated on the big files and folders. And get the required free disk space much faster ;)

Personally, I would recommend a great utility to visualise the disk usage - WinDirStat. It's open source software and hosted at SourceForge.net, free to use, small, fast and pretty simple - start it and select a disk drive you would like to analyze. In a minute you will have a tree of folders sorted by size. In addition it has "treemap" feature which gives you visual feeling of what and how is big.

Screenshot of disk space usage shown by WinDirStat

Try it. I bet you'll find a lot of unused stuff.

This is a first part of "System Disk Cleanup" series.

 

Thursday, June 21, 2007

Send an email by GMail from ASP.NET 2.0

If you try to use ChangePassword control with GMail server in your settings, you'll probably get failed. To fix that you need to use SSL to send an email, and also - set SMTP server port to 587.

To use SSL add a handler to SendingMail event of the control with the following body:

protected void _ctrlPasswordRecovery_SendingMail(object sender, MailMessageEventArgs e)

{

        // send the same email, but with SSL enable

    SmtpClient client = new SmtpClient();

    client.EnableSsl = true;

    client.Send(e.Message);

 

        // cancel the sending by control

    e.Cancel = true;

}

Labels: , , , , ,