Programmatically set WCF timeout in debug mode

I’m using WCF in communication between a server and client (both written in C#). In release-mode, the timouts should be set to ~20 seconds, but in debug mode I want to set them to a higher value so that I can debug/step in my code without the timeout occurring. I know that I can change … Read more

Using .NET library from PowerShell

I have a PowerShell snap-in for manipulating a database. The snap-in itself is just a wrapper for the main library implemented in a separate .NET DLL all written in c#. I have registered both the snap-in and the implementation DLLs with the GAC using installutil.exe Whilst the snap-in works fine in PowerShell, I need to … Read more

Emacs Lisp: difference between (function (lambda …)) and (lambda …)?

What is the difference between (function (lambda …)) and (lambda …) and ‘(lambda …) ? It seems three are interchangeable in a lot of cases. Answer They are pretty interchangeable. The answer is that function enables the lambda to be byte compiled, whereas the other two do not (and are equivalent). Note: this does not … Read more

Tool to find out XPath [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

Does creating a nonclustered index on a SQL Server 2005 table prevent selects?

I’d like to create an index on a view I have but I need to make sure the data can still be read while the index is being created. I was reading an article that suggested that when creating a nonclustered index that the data is still readable if you specify the ONLINE=ON option (example … Read more

Validating C# base class constructor parameter

After running Code Analysis in VS2010 beta (FxCop for previous versions) I’m getting the following warning: In externally visible method ‘Identity.Identity(WindowsIdentity)’, validate parameter ‘windowsIdentity’ before using it. The constructor is: public Identity(WindowsIdentity windowsIdentity) : base(windowsIdentity.Token) { init(); } for a class defined as: public class Identity : WindowsIdentity My question is, how do I validate … Read more

Why isn’t the richtextbox displaying this table properly?

Apparently, the RichTextBox provided by Microsoft doesn’t fully support the RTF specs. For some reason, it won’t permit multi-lined rows, and destroys formatting instead. Forexample, here is the RTF code to generate a table: \par \trowd\trgaph108\trleft36\trqc\trrh280\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \cellx2000\cellx4000\cellx6000\cellx6500\cellx8500\cellx9000\cellx11000 \pard\intbl Length of Time until Replayment\cell\cell Flate Fee Percentage\cell\cell Broker and Application Fees\cell\cell Total lien on case\cell\row \trowd\trgaph108\trleft36\trqc\trrh280\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 … Read more