Tuesday, April 21, 2009
Project could not be opened because Microsoft Visual C# 2008 compiler could not be created
If this error is buzzing you then there is an easy solution for this. First Close all Visual Studio instances that are presently running. Open Windows registry editor (run -> regedit) and go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Packages. There you will find a Key called SkipLoading. Check the value, it must be 0x00000001. Change it to 0x00000000 and you are done.
Just restart the Visual Studio and enjoy...
Happy Coding...
Monday, February 23, 2009
In Love with my Sony H10 digital camera
But something I dislike about it are: Focusing a object when I am in Macro mode, its tough to focus properly. Secondly the grains in the picture due to noise. I think Sony should care about it. Thirdly, the battery discharges soon. Actually the culprit is the big LCD screen which consumes much energy, though it runs on Lithium battery. Lastly the accessories are costly than the other company make camera like Canon, Kodak etc of its kind.
I know all products have some pros and cons. so taking it into consideration, I am happy with it for now.
For more details about this gear Click Here.
But but but.... when I see any DSLR or the pictures taken by it I used to drool... OMG! stunning picture quality and stunning performance. Don't know when I will be financially able to grab a DSLR, but I will definitely go for it one day! and for now my dream gear is Canon 450D.
Now let me share some pictures taken with Sony H10
#1
#2

#3
#4

and there's many more...
To see some others please go here : http://www.flickr.com/photos/koushikdas/
Thanks and Regards
Koushik
Monday, May 5, 2008
Showing Reports by ReportViewer Control and NHibernate
In one of my Projects I was told to show some data using ReportViewer control and NHibernate. I had no idea how to do it.
Started Googling.... But I was quite surprised there was no such postings, even not found any information whether it is possible or not ! Never mind, started doing it and after completion found it pretty simple. Would like to share it with you.
Step 1:
I am using a single table, say Customers with the following schema :
Customers |
CustomerID int IDENTITY(1,1) NOT NULL, FirstName nvarchar(50) default NULL, LastName nvarchar(50) default NULL, Address nvarchar(150) default NULL, PRIMARY KEY (CustomerID) |
The Business Class is:
Customer.cs |
namespace NHibernate.Example { public class Customer { public Customer() { } private int id; private string firstName; private string lastName; private string address; public virtual int Id { get { return id; } set { id = value; } } public virtual string FirstName { get { return firstName; } set { firstName = value; } } public virtual string LastName { get { return lastName; } set { lastName = value; } } public virtual string Address { get { return address; } set { address = value; } } } } |
And Here is the Mapping file:

We have to create a Typed Dataset in App_Code folder of our Website (or you can have your separate Project Library for DataSet). The data table of this DataSet will contain the fields which we want to show in our Report. Here, I would like to show all the fields of my Customers table. Therefore my Dataset looks like this :
Step 3 :
Create a RDLC file. Arrange the fields just by dragging and dropping the fileds of Dataset which you will find "Website data Sources" toolbar (to view this toolbar just click the RDLC body, go to the menu "Data" --> "Show Data Sources").
Step 4:
Now the whole environment is ready for coding. Just add a ReportViewer to an aspx page and use the following code and you are done to throw some data on your screen!
using System; using System.Collections; using Microsoft.Reporting.WebForms; using NHibernate; using NHibernate.Example; public partial class CustomerReport : System.Web.UI.Page { DataSet1 ds = new DataSet1(); NHibernate.Cfg.Configuration newConfig = new NHibernate.Cfg.Configuration(); ISessionFactory sFactory; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { newConfig = newConfig.AddAssembly("NHibernate.Example"); sFactory = newConfig.BuildSessionFactory(); rvCustomer.LocalReport.ReportPath = "TestReport.rdlc"; rvCustomer.LocalReport.ReportEmbeddedResource = "ReportViewer.TestReport.rdlc"; rvCustomer.LocalReport.DataSources.Clear(); ISession session = sFactory.OpenSession(); //get the list of customers using NHibernate IList customers = session.CreateCriteria(typeof(Customer)).List(); //populate the typed Dataset foreach (Customer customer in customers) { ds.Customers.AddCustomersRow(customer.Id.ToString(), customer.FirstName, customer.LastName, customer.Address); } rvCustomer.LocalReport.DataSources.Add( new ReportDataSource("DataSet1_DataTable1", ds.Customers)); } // data Source name "DataSet1_DataTable1" generally made by DataSet name + "_" // + DataTable name of the DataSet } } |
Finally the Output :
----------------------------------------------------------
Saturday, July 7, 2007
Photos of Digha
=> => =>
---- ~ -----
Place of Root
Hi Friends...
Panagarh(23.40N, 87.25E) is a small town situated under Durgapur subdivision in Burdwan district of West Bengal and near about 150 km for Kolkata. Any nature lover may fall in love with its intrinsic beauty where your lungs can feel free to breath. Many small and huge forests (eg, 11 miles) are there where you can find the place of solitude which can help for a complete relaxation. Two mighty rivers "Damodar" and "Ajay" flow nearby this area which have some economical value too and I think DVC(Damodar Vally Corporation) is the best example.
Not only the beautiful nature, Panagarh is also enriched with some historical values. There is a very ancient Air Force camp. This is very rare place where both the Indian Army and Air force have their establishment. There is an Airport which is extensively used by Indian Air Force. You can not find the name of Panagarh in an ancient political map because it was a secrete place of Indian Air force and Army. Now a days the Air force had shifted their base to little more inside than before because of some heavy damages of the runway and some interesting places like "firing squad ground", "cannon place" and the residential place of the Army persons. Now this huge area is now uncovered to any body and for this reason this abandon place of Indian Army has become the most happening place of spending leisure afternoons and evenings.
A very beautiful place is there nearby Panagarh which is called Randeeha. There is a barrage here and a beautiful river side place. I took some pictures with my mobile which may describe this place (Randeeha) better than me.
.jpg)
.jpg)
.jpg)
Now the road transportation of Panagarh has improved a lot. Now Kolkata is directly connected to it on road and takes just less than 3 hours in Bus which is very much available now a days. The Grand Trunk road (GT Road) and NH 34 have connected Panagarh to various other places which made life easy for the people.
That is some extended view of Panagarh where I born and studied till my 10th standards in the Panagarh Kanksa High school.
If you want to know something more about this place then please let me know.
---- ~ ----