August 17, 2010
Visual C++ Debug Error - Microsoft.VC80.DebugCRT could not be found - SidebySide Error
Microsoft Web Platform Installer
Microsoft has started providing one installer for all like wamp and xamp.
http://www.microsoft.com/web/downloads/platform.aspx
It’s in beta and it install following in one go
Popular Web Apps
- Install free popular ASP.NET and PHP web apps such as DotNetNuke and WordPress.
-
.NET Framework
Install the latest version of the .NET Framework. This includes everything you need to work with ASP.NET.
-
IIS and Extensions
Install the latest version of IIS, including latest IIS Web extensions like IIS Media Services.
-
SQL Server
Install the latest version of SQL Server 2008 Express. This includes both the database engine and tools.
-
Visual Web Developer
Install the latest version of Visual Web Developer Express, Our full featured free web development tool.
-
Extra and Goodies
In addition to everything above, the Web PI also includes the latest community version of PHP for Windows.
Back to Hotmail
I started using hotmail after long time (may be 4-5 years) and very much impressed with it. I specially like functionality of everything one place. Flickr like photo album, Skydrive to store you data, Spaces for blogging, Social networking and yes email and much more. Recently I lost my data and all pictures and now trying to recover from different places so now uploading all pictures to skydrive. It allows to download whole album as zip file which is great. There is desktop tool for everything which is quit helpful. Another feature I like most is, I can add more email addresses and check all mail at one place. Great!!!
XMLDocument to string
System.Xml.XmlTextWriter tr = new System.Xml.XmlTextWriter(sw);
xDoc.WriteContentTo(tr);
string xmlstring = sw.ToString();
tr.Close();
sw.Close();
Error - The web services enumeration components are not available
Abstract class v/s interface
- It is a contract not a class, so cannot instantiated. You can inherited class from multiple interface.
- It is not whole entity but part of entity behavior.
- Once you create interface and thousand of classes inheriting, you cannot change it. If you change, all the classes needs to recompile
- If you change interface, all classes inheriting it, should also make changes accordingly
- Try to create interface with at most one contract. For more contract, create inherited interface. For e.g. IEnumerable, ICountable and if need both, create inherited interface ICollection : IEnumerable, ICountable. This is not kind of rule but best practice to use interface.
- Use interface carefully. You design will not be flexible.
- If a class is not a type of another class but they have common function, use interface. Example: FullTimeStaff and Customer should not come from the same base class but they may have common function, e.g. discountRate; in this case, interface is more appropriate.
Abstract Class
- It is class with implementation or without implementation. It cannot instantiated but can inherited. You cannot inherit multiple abstract classes.
- It defines whole entity. If you need default implementation for all inherited classes, use abstract class instead of interface.
- With all empty methods, Abstract class is same as interface
- You can make changes in abstract class and inherited class will work fine most of the time without recompile.
- Good thing is , you can add functionality from it and all classes inherited from it will automatically get that functionality.
- Bad thing is, inherited class can assume wrongly that this method is implemented in base class but it might be possible that it is not implemented or implemented differently.
- If a class is a type of another class, use abstract class because abstract class is for inheritance. Example: PartTimeStaff and FullTimeStaff is a type of Staff.
Here are some recommendations to help you to decide whether to use an interface or an abstract class to provide polymorphism for your components.
If you anticipate creating multiple versions of your component, create an abstract class. Abstract classes provide a simple and easy way to version your components. By updating the base class, all inheriting classes are automatically updated with the change. Interfaces, on the other hand, cannot be changed once created. If a new version of an interface is required, you must create a whole new interface.
If the functionality you are creating will be useful across a wide range of disparate objects, use an interface. Abstract classes should be used primarily for objects that are closely related, whereas interfaces are best suited for providing
Migrate your sql server 2000 database to oracle
Windows service setup creation - Custom Action
created one windows service and then create setup for it. It was very simple setup and I check everything. When I tried to install, it was not showing in services. I can install it through InstallUtil.exe but not showing through installer. Later I found that I have to add custom action. I thought I don’t need any custom action but after adding it, it works fine. Installer is installing service and showing in services.
How to see which ports are currently in use
We were having around 10-12 win services which are using ports to communicate with each other. we always need to see which ports are currently in use. I am using this command to see it on command prompt.
NETSTAT
Just wanted to keep it here so I won’t forget when I need it.
Update: use this tool to view open ports
TCP view for windows
http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx
order of parameter while calling oracle stored procedure from odp.net
I found strange behavior while calling stored procedure of oracle through odp.net. I have store proc which has first parameter as output parameter. (Generally output param should be last but this is my company’s recommendation to put OUT first then IN/OUT and IN ). While building parameters, when I add output parameter as last parameter, it gives me wrong result.
in oracle I have procedure…
procedure GetValue(p1 out number, p2 in number, p3 in number)
adding parameter to command object
m_Params = new OracleParameter[]
{
MakeInParam(”p2″ ,OracleDbType.Int32,16, v2),
MakeInParam(”p3″ ,OracleDbType.Int32,16, v3),
MakeOutParam(”p1″ ,OracleDbType.Int32,16)
};
MakeInParam and makeOutParam are my own function which is creating param object and returning
OracleCommand cmd = CreateCommand(”GetValue”, m_Params);
cmd.ExecuteNonQuery();
When I am keeping Out param last on list, I am getting wrong value. instead of 1 I am getting 0. when I am keeping Out param as first on list, I am getting proper value.
m_Params = new OracleParameter[]
{
MakeOutParam(”p1″ ,OracleDbType.Int32,16),
MakeInParam(”p2″ ,OracleDbType.Int32,16, v2),
MakeInParam(”p3″ ,OracleDbType.Int32,16, v3)
};
It should consider parameter name while returning value instead of its order.