msdn

ASP.NET: How parallel requests are processed

跟風遠走 提交于 2019-11-30 13:29:42
Let's imaging there are 2 pages on the web site: quick and slow. Requests to slow page are executed for a 1 minute, request to quick 5 seconds. Whole my development career I thought that if 1st started request is slow: he will do a (synchronous) call to DB... wait answer... If during this time request to quick page will be done, this request will be processed while system is waiting for response from DB. But today I've found: http://msdn.microsoft.com/en-us/library/system.web.httpapplication.aspx One instance of the HttpApplication class is used to process many requests in its lifetime.

Why is using [DataMember(EmitDefaultValue = false)] not recommended?

自闭症网瘾萝莉.ら 提交于 2019-11-30 07:54:39
In WCF you can define a contract using the [DataContract] and [DataMember] attributes, like this: [DataContract] public class Sample { [DataMember(EmitDefaultValue = false, IsRequired = false)] public string Test { get; set; } } This article on the MSDN states that using EmitDefaultValue = false is not recommended: However, i like to use this, because the XML that is generated using this construction is cleaner. Not specifying this setting results in: <Sample> <Test xsi:nil="true"/> </Sample> while using the setting the element is ommited when there is no value: <Sample> </Sample> I'm curious

ASP.NET: How parallel requests are processed

主宰稳场 提交于 2019-11-29 19:14:28
问题 Let's imaging there are 2 pages on the web site: quick and slow. Requests to slow page are executed for a 1 minute, request to quick 5 seconds. Whole my development career I thought that if 1st started request is slow: he will do a (synchronous) call to DB... wait answer... If during this time request to quick page will be done, this request will be processed while system is waiting for response from DB. But today I've found: http://msdn.microsoft.com/en-us/library/system.web.httpapplication

MSDN subscriptions on the cheap? [closed]

守給你的承諾、 提交于 2019-11-29 19:07:38
As a long time Microsoft developer, I find MSDN to be an invaluable resource. However, when tinkering at home I am not able to play with the best latest technologies and the different offerings coming from Microsoft as I cannot justify paying such a hefty price for what is essentially a pastime. The Express editions are great, but fall flat when trying to use the more advanced feature I am used to from the versions I use at work. I cannot get the latest betas and play with the new offerings, not legally, anyway. Apart from getting an MVP , how would one go about getting an MSDN subscription

EnumDisplayDevices function not working for me

南笙酒味 提交于 2019-11-29 15:35:20
问题 I'm trying to get info on my monitors programmatically. The content of the loops is not important right now, they just contain debug statements that will be printed when the loop condition is satisfied. Right now, the outer loop code executes three times and the inner loop code is never accessed, meaning the while condition of the (inner) loop is never true, meaning that call fails. My problem here is that the Windows API says, regarding this function: To obtain information on a display

Calling SHGetSetSettings from Delphi

杀马特。学长 韩版系。学妹 提交于 2019-11-29 15:21:00
I just read this question and this question , and since then I have been trying to call SHGetSetSettings in Delphi. This is a function of shell32.dll , but is not defined in ShlObj.pas , so we need to write our own definition. First we need to translate the SHELLSTATE structure. Now I have only limited experience in C, but I suppose that ": 1" means that the member of the structure is a single bit, that is, that eight of them can be packed together in a byte. I also suppose that DWORD = UINT = 32-bit unsigned integers and that LONG = int are 32-bit signed integers. But then we have a problem:

why can MemoryBarrier be implemented as a call to xchg?

一世执手 提交于 2019-11-29 14:51:57
on msdn http://msdn.microsoft.com/en-us/library/windows/desktop/ms684208(v=vs.85).aspx , MemoryBarrier is implemented as a call to xchg. // x86 FORCEINLINE VOID MemoryBarrier ( VOID ) { LONG Barrier; __asm { xchg Barrier, eax } } I can't find some material in "Software Developer's Manual". please tell me the reason. From Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3: "System Programming Guide" 8.2.5 "Strengthening or Weakening the Memory-Ordering Model" Synchronization mechanisms in multiple-processor systems may depend upon a strong memory-ordering model. Here, a

Load search URL in browser from Visual Studio

百般思念 提交于 2019-11-29 10:59:51
I'm finding the built-in Visual Studio Document Explorer less relevant , especially as more of the SDKs I work with have the most up-to-date content on-line . Pressing F1 starts Document Explorer usually with something unhelpful and it's not usable any more for me. Is there any way that on the press of a key combination in Visual Studio : the default browser opens to the URL of a search engine query used is the keyword under the current cursor position a filter is added such as site:msdn.microsoft.com I don't know anything about macros in VS but presumably that's what I need. Does anyone know

Reverse-Mapping for String Enums

眉间皱痕 提交于 2019-11-29 06:01:15
I wanted to use string enums in typescript but I can't see a support for reversed mapping in it. I have an enum like this: enum Mode { Silent = "Silent", Normal = "Normal", Deleted = "Deleted" } and I need to use it like this: let modeStr: string; let mode: Mode = Mode[modeStr]; and yes I don't know what is it there in modeStr string and I need it parsed to the enum or a fail at parsing in runtime if the string is not presented in the enum definition. How can I do that as neat as it can be? thanks in advance We can make the Mode to be a type and a value at the same type. type Mode = string;

Is read-only auto-implemented property possible?

橙三吉。 提交于 2019-11-29 00:50:05
I found a topic on MSDN that talks that yes, this is possible. I did a test that seems to break this statement: using System; namespace Test { class Program { static void Main(string[] args) { Foo f = new Foo("1"); Console.WriteLine(f.Bar); // prints 1 f.Test("2"); Console.WriteLine(f.Bar);// successfully prints 2 } } class Foo { public Foo(string b) { this.Bar = b; } public string Bar { get; private set; } public void Test(string b) { // this would be impossible for readonly field! // next error would be occur: CS0191 or CS0191 // A readonly field cannot be assigned to (except in a