If you are trouble-shooting an AlwaysOn Availability Group topology, a study of the wait statistics will give a pointer to many of the causes of problems. Although several waittypes are documented, there is nothing like practical experiment to familiarize yourself with new wait stats, and Joe Sack demonstrates a way of testing the sort of waits…
I'm working on a PoSh project that generates CSharp code, and then Add-Types it into memory.
The new types use existing types in an on disk DLL, which is loaded via Add-Type.
All is well and good untill I actualy try to invoke methods on the new types. Here's an example of what I'm doing:
$PWD = "."
rm -Force $PWD\TestClassOne*
$code = "…
SQL Wait Stats
About a year ago, I had very proud moment. I had published my second book SQL Server Wait Stats with me as a primary author. It has been a long journey since then. The book got great response and it was widely accepted in the community. It was first of its kind of book written specifically on Wait Stats and Performance. The…
Since the removal of the 8KB limit on serialization, the ability to define new data types using SQL CLR integration is now almost at a usable level, apart from one key omission: indexes. We have no ability to create our own types of index to support our data types. As a good example of this, consider that when Microsoft introduced the…
Today, I have one very simple question based on following image. A full disclaimer is that I have no idea why it is like that. I tried to reach out to few of my friends who know a lot about SQL Server but no one has any answer.
Here is the question:
If you go to server properties and click on Advanced you will see the following…
I will be presenting in person on the subject SQL Server WaitTypes and Queues at Ahmedabad on June 11, 2011.
Here is the quick summary of the session.
SQL Server Waits and Queues – Your Gateway to Perf. Troubleshooting
Time: 11:15am – 12:15pm – June 11, 2011
Just like a horoscope, SQL Server Waits and Queues can reveal your past,…
Is it possible to use custom types in OpenCL kernel like gmp types (mpz_t, mpq_t, …) ?
To have something like that (this kernel doesn't build just because of #include <gmp.h>) :
#include <gmp.h>
__kernel square(
__global mpz_t* input,
__global mpz_t number,
__global int* output,
const unsigned int count)…
Today I came to a fundamental paradox of the object programming style, concrete types or interfaces.
Whats the better election for a method's return type: a concrete type or an interface?
In most cases, I tend to use concrete types as the return type for methods. because I believe that an concrete type is more flexible for…
Can someone give me a list, or point me to where I can find a list of C# data types that can be a nullable type?
For example:
I know that Nullable<int> is ok
I know that Nullable<byte[]> is not.
I'd like to know which types are nullable and which are not. BTW, I know I can test for this at runtime. However,…
I've recently had a question about coledatetime java implementation, and Chris said, that the problem might lay in type conversions: cpp-float vs java-float (Or maybe cpp-date vs java-date. Not types, but..). Now I have several questions on this:
Is there a table of comparison for java vs c++ types?
If type conversions…
I want to apply a function to every element in a list (map) but the elements may have different types but all implement the same function (here "putOut") like an interface. However I cannot create a list of this "interface" type (here "Outputable").
How do I map a list of different types implementing the same function?
…
I making a method that generate a unique string key for some parameters. But the same key if call with same values.
I just accept primitive types, string, DateTime, Guid, and Nullable(since I append types together, I can distinguish who is int and who is int?), because I can convert all to string without lost values or…
template< class T1, class T2 >
class Pair {
T1 first;
T2 second;
};
I'm being asked to write a swap() method so that the first element becomes the second and the second the first. I have:
Pair<T2,T1> swap() {
return Pair<T2,T1>(second, first);
}
But this returns a new object rather…
I'm working in an Android project with multithreading. Basically I have to wait to the server to respond before sending more data.
The data sending task is delimited by the flag boolean hasServerResponded so the Thread will loop infinitely without doing anything until the flag becomes true.
Since this boolean…
I have been repeatedly asked these question in many interviews.... But still can't able to explain them with a simple example...
What is nullable types in c#?When should one use nullable types in c#?Any simple ex?
Any suggestion....
Arrays, functions, pointers, references, classes, unions, enumerations and pointers to members are compound types.
My understanding of a compound type is that is based on other type(s). For example, T[n], T* and T& are all based on T. Then what other type(s) is an enumeration based on?
Or if my…
This question is for the people who know both Haskell (or any other functional language that supports Higher-kinded Types) and C++...
Is it possible to model higher kinded types using C++ templates? If yes, then how?
SOME THEORY
I've been doing some reading on tcp TIME-WAIT (here and there) and what I read is that it's a value set to 2 x MSL (maximum segment life) which keeps a connection in the "connection table" for a while to guarantee that, "before your allowed to create a connection with the same tuple, all…
Value types are types which do not have an identity. When one variable is modified, other instances are not.
Using Javascript syntax as an example, here is how a value type works.
var foo = { a: 42 };
var bar = foo;
bar.a = 0;
// foo.a is still 42
Reference types are types which do have an…
Nullable types vs Non-nullable types While developing our C# projects its frequent the null comparison operation to avoid null exceptions. This simple operation is mainly coded using the "var x = null" code example inside an if clause. However not all types of variables are nullable,…
Ok everyone, I must be missing something here.
Every LINQ example I have seen for VB.NET anonymous types claims I can do something like this:
Dim Info As EnumerableRowCollection = pDataSet.Tables(0).AsEnumerable
Dim Infos = From a In Info _
…
While reading Wikipedia's page on decltype, I was curious about the statement,
Its [decltype's] primary intended use is in generic
programming, where it is often
difficult, or even impossible, to name
types that depend on template
parameters.
While I can understand the…
there.
I am wondering how I can get the key and value types of a non-generic IDictionary at runtime.
For generic IDictionary, we can use reflection to get the generic arguments, which has been answered here.
But for non-generic IDictionary, for instance, HybridDictionary, how can…