суббота, 12 марта 2011 г.

Check all checkboxes on the page wity JQuery

javascript:$("input[type=checkbox]").attr('checked', true);

среда, 9 февраля 2011 г.

C# Runtime objects comparison (find differences)

Put the following code to Immediate Window (Ctrl + Alt + I)

// Create StringWriter
System.IO.StringWriter stringWriter = new System.IO.StringWriter();

// Serialize object to the stringWriter.
new System.Xml.Serialization.XmlSerializer(obj.GetType()).Serialize(stringWriter, obj);

// Get serialized output.
stringWriter.ToString();

After you get xml strings for the serialized objs, that you wanted to compare you can easily compare this string in Araxis Merge or WinDiff tools.

пятница, 5 ноября 2010 г.

Service Broker

С помощью следующего скрипта можно посмотреть для каких баз включен Service Broker^

SELECT [name], is_broker_enabled FROM sys.databases Order By [name]

воскресенье, 1 августа 2010 г.

Spreadsheet with majority internet plans

http://spreadsheets.google.com/pub?key=0AgjBqA-27ZjCcloteS0waUNYQ2NpemJUNU52a3V0Snc&gid=6

четверг, 10 июня 2010 г.

Glue files into big one

for %f in (*.cs) do type %f >> ALL.cs

вторник, 25 мая 2010 г.

How to use Araxis Merge with Total Commander

Add following row in "[Configuration]" section in "C:\Program Files\Total Commander\Wincmd.ini" file:

Comparetool=C:\Program Files\Araxis\Araxis Merge\Merge.exe

Keep in mind that mentioned files may be located in different locations.