2011 Oct 26, 8:04
"Knowledge is Power; France is bacon"
technical 2011 Oct 25, 5:37
An original iPod guy has a new company that makes... wait for it... thermostats. Weird. Well they look cool anyway.
technical 2011 Oct 25, 5:33
Its not a bug -- its a feature! Very cool unread mail demo.
technical 2011 Oct 24, 2:14
Ninjas fight dirty.
technical 2011 Oct 20, 6:52
Wow, FTA: "Given all of this, reporter Charlie Savage of the NY Times filed a Freedom of Information Act request to find out the federal government's interpretation of its own law... and had it
refused. According to the federal government, its own interpretation of the law is classified."
technical 2011 Oct 19, 5:58
The following code works fine. I have a ccomptr named resolvedUri and I want to update its hostname so I do the following:
CreateIUriBuilder(resolvedUri, 0, 0, &builder);
builder->SetHost(host);
builder->CreateUri(0xFFFFFFFF, 0, 0, &resolvedUri);
But the following similar looking code has a bug:
ResolveHost(resolvedUri, &resolvedUri);
The issue is that doing &resolvedUri gets the address of the pointer but also clears out the pointer due to the definition of my smart pointer class:
operator T**()
{
T *ptrValue = mPtrValue;
mPtrValue->Release();
mPtrValue = NULL;
return &ptrValue;
}
In C++ there’s no guarantee about the order in which parameters for a function or method are evaluated. In the case above, &resolvedUri clears out the ccomptr before evaluating
resolvedUri.Get() and so ResolveHostAlias gets a nullptr.
An interesting and related thread on stack overflow on
undefined behavior in C++.
c++ technical bug programming smart-pointer cpp 2011 Oct 19, 2:07
Don't prefix your proprietary URI schemes with "x-". Your company name or label reversed domain name is acceptable though.
technical 2011 Oct 19, 1:01
Describes additional HTTP status codes including 511 for captive portals asking for auth.
technical 2011 Oct 18, 7:16
Just discussing this recently. Maybe sleeps like a baby is meant to indicate the depth of the sleep and not the duration?
technical 2011 Oct 18, 4:52
I haven't been updating my blog recently. But I have three excellent reasons:
2011 Oct 17, 6:03technical 2011 Oct 17, 5:58
Essentially anybody can resolve it however they like except for tokens from the about URI special token registry which currently only contains 'blank'.
technical