Tuesday

jquery checkbox check all


<script type="text/javascript">
$(document).ready(function()
{

$('#chkAll').click(
function()
{
$("INPUT[type='checkbox']").attr('checked', $('#chkAll').is(':checked'));
}
)

}
);
</script>

<asp:TemplateColumn HeaderText="" headerstyle-cssclass="NormalBold">
<HeaderTemplate>
<input type='checkbox' id='chkAll' >
</HeaderTemplate>

<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" />
</ItemTemplate>
</asp:TemplateColumn>


SQL Server 2000 DTS Designer components are required to edit DTS packages.


I've got this error when opening DTS package in Microsoft SQL Server Management Studio:
SQL Server 2000 DTS Designer components are required to edit DTS packages. Install the special Web download, "SQL Server 2000 DTS Designer Components" to use this feature. (Microsoft.SqlServer.DtsObjectExplorerUI)

Problem was fixed after changing order in Path variables (System Properties/Environment Variables/System variables):

C:\Program Files\Microsoft SQL Server\80\Tools\Binn\; should appear before the
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;


Incase of 64 bit machine:
C:\Program Files (x86)\Microsoft SQL Server\80\Tools\Binn\;

Please make sure to restart Microsoft SQL Server Management Studio after changing path.

Thursday

xdocument elements getting by SafeElement function


public string SafeElem(XDocument x, string tag, string _default_)
{
string r = _default_;
IEnumerable<XElement> a = x.Elements(tag);
if (a!=null && a.Count() >0)
{
string g= a.First().Value;
if (!string.IsNullOrEmpty(g))
{
r = g;
}
}
return r;
}


imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...