Wednesday, September 09, 2009

One of my old favorite Games - Z (Strategy)



Z - strategy game

i used to love this game , it was quite fascinating strategy game around 1996

download : http://www.486games.net/game.php?id=173

Tuesday, August 25, 2009

Crystal Report XI - ASP.NET 2005, Not enough memory for operation.

Recently I have faced certain error when i was trying access Report Viewer in deployed asp.net 2005 application with Crystal Report XI/11 on IIS
error was :

Not enough memory for operation.

Exception Details: System.Runtime.InteropServices.COMException: Not enough memory for operation.

there was hundreds of solutions neither worked for me..
finally i have installed Crystal Report XI server .NET release 2 that worked :)

download crystal report run-times for Crystal Report XI at:
http://resources.businessobjects.com/support/additional_downloads/runtime.asp#06

Thursday, July 23, 2009

Enum To ListItem Collection

private System.ComponentModel.BindingList<ListItem> EnumToList(Type enumType)
{
System.ComponentModel.BindingList<ListItem> listItemBindingList = new System.ComponentModel.BindingList<ListItem>();
foreach (Enum item in Enum.GetValues(enumType))
{
ListItem lItem = new ListItem(item.ToString("D"), item.ToString("G"));
listItemBindingList.Add(lItem);
}
}



you can call the method
BindingList<ListItem> listItemBindingList = EnumToList(typeof(YourEnum));

Monday, July 13, 2009

ASP.NET GridView - Format Template column data using format strings and Custom Methods

This article contains GridView template column formatting through Data Format String, ternary operator blocks and custom methods.

Using Format String
Date time


<itemtemplate>
<asp:Label ID="lblDOB" runat="server" Text='<%# Eval("DOB","{0:d}") %>'></asp:Label>
</itemtemplate>
</asp:TemplateField>

For Long Date,

<itemtemplate>
<asp:Label ID="Label8" runat="server" Text='<%# Eval("DOB","{0:d}") %>'></asp:Label>
</itemtemplate>
</asp:TemplateField>

Using ternary operator

<ItemTemplate>
<asp:Image
ID="ImageOpenPending" runat="server"
ImageUrl='<%# Convert.ToInt32(Eval("StateId")) == 1 ? "~/images/icons/DashBoard_Green_Bullet.gif" : "~/images/icons/DashBoard_Red_Bullet.gif" %>' />

<asp:HyperLink ID="HyperLinkWorkOrderSummery" runat="server"
NavigateUrl='<%# "~/AuthUser/WorkOrder_Main.aspx?Id=" + HttpUtility.UrlEncode(DataBinder.Eval(Container.DataItem,"Id").ToString()) + "&mode=View" %>' > <%#Convert.ToDateTime(Eval("StartDate")).ToShortDateString().ToString() + " ," %>
</asp:HyperLink>
</ItemTemplate>

Using a code behind custom method



<ItemTemplate>
<asp:Label ID="LabelPublicComment" runat="server" ToolTip='<%# Eval("PublicComment") %>'
Text='<%# FormatName(DataBinder.Eval(Container.DataItem, "PublicComment")).ToString() %>'>
</asp:Label>
</ItemTemplate>


Write this method in code behind

protected string FormatName(object description)
{
string desc = Convert.ToString(description);
if (desc.Length > 25)
return desc.Substring(0, 25) + "..";
else
return desc;
}

Wednesday, January 07, 2009

MD5 Crisis

Now MD5 hash function is said to be no longer reliable and recommended to go for SHA1 SHA2
More…

http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html
news.google.com

Thursday, December 18, 2008

KGB Archiver - What a compression

Recently one of my friends introduced me a new archiving software that having an unbelievable compression ratio with its maximum mode,

Plus unbelievable duration for compression, don’t worry anyway they have provided “turn off the machine after compression” facility ;)



KGB Archiver - http://kgbarchiver.net/?page=home

Friday, July 04, 2008

Customer who developed a Open Source Charting Component

We have found a interesting open source Flash Charting component which
is free at the moment :)

What made him write the component...?

http://teethgrinder.co.uk/open-flash-chart/