Twitter Tips and Tricks

I recently went back to twitter after a long time, but was disappointed by the lack of

Tools and Extensions to read my Timeline etc.

The only 2
avarage readers for timeline etc. streams are:


2.       Chrome
Extension for Twitter: TweetDeck

On the other
hand to get your own activity as RSS there is:
which works ….

What I was
looking for was RSS Feed of the timeline, which I did not find….






Variance in Delegates

1.       Delegates
can have Contravariant Parameter Type and covariant return type.

2.       But
this does not mean Contravariance for the actual function that the delegates
are pointing to.

3.       Eg.

    public static void f1(Object o)

        public static void Main(string[] args)
            Action<object> x = f1;
            Action<string> y = x;

Here even though a Delegate for string is referencing
Object delegate (Contravariance), you can  call the underlying function f1 by
passing a subtype of Object only (which is Covariance).

Use of “in”

1.       The
Action used here is actually delegate void CustomAction<in T>(T arg);

2.       But
when u remove in from the decleration, compiler doesn’t allow:
Action<string> y = x;

3.       Note
that the compiler complains about this even for 2.0 or 3.0 framework and on adding
“in”, it works even in 2.0






SQL Server Express LocalDB


1.     ItIs installed by VS 2012 Pro

2.     This is execution mode of SQL Express (Not a service), so can do everything of
Express without having to install Express externally. To confirm this you can see
the sqlserver.exe process in the Task Manager

Go to SQL Server Object Explorer Window in VS 2012 and you’ll see it
under servers with Name: (localdb)\Projects:

a.       Location:

b.      Connection
Data Source=(localdb)\Projects;Initial Catalog=master;Integrated
Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False

c.       Version
: 11

d.      OS:
Microsoft Windows NT 6.1 (7601)

e.      Product:
Microsoft SQL Server Express Edition (64-bit)

When we create a new Project of type SQL Server Database Project (after
installing SSDT), we can see that in project properties, the target is SQL
Server 2012 only and the connection strin (in Debug) is set to the Local DB :
Data Source=(localdb)\Projects;Initial Catalog=Database1;Integrated
Security=True;Pooling=False;Connect Timeout=30

Query Inside Iframe Using Jquery

My requirement is to create a chart of data from 2 sources that return data inside

different iframes on my page:

<iframe src="" style="height250px; width360px"></iframe>
<iframe src="" style="height250px; width360px"></iframe>


Now when I
try to load any of these locally using ajax I get CORS Error:

$(document).ready(function () {
    $("#GetInfo").click(function () {
            url: " ", success: function (result) {


So the
simplest way would be to query inside iframe using Jquery:


Ref :

But, It
cannot be done in case the iframe src is in a different domain. I tried
accessing and got this error:


Blocked a frame with
origin “http://localhost:9107” from accessing a frame
with origin ““.
Protocols, domains, and ports must match. jquery.js:5883

Blocked a frame with origin “http://localhost:9107&#8221; from accessing a
cross-origin frame.


So now I’m
creating a proxy that will send over JSON to this client page where the data
will be displayed on the Main HTML page only and not iFrames.






Communivating (client to server) in Real Time VS in Chunks


S. No.

Real Time (wsDualHttpBinding)



The no. of http connections increase to 2x

No. of http connections will be > 2x, depending on the size of chunk
and the requirements to send exceptions in real time


All connections are long lived so 1 thread is blocked for each http
request forever

All connections are short lived, so the thread is not blocked for a
long time.


Real time reporting and tracking is possible

Delayed reporting (Delay depends on the size of the chunk and the
latency configured)


Real Time messages so no file to write to.

Latency in writing to the log file and sending it over

This is what I had listed before doing this Tutorial:

Now I See that with wsDualHttpBinding, every call to the
endpoint is a new method and so the only best way to keep both the channels
open is to do long polling at both sides…which is complicated specially when implemented
with Async stuff….




SignalR for Communication between WCF svc and Windows Form Client

What Transport will be used ?

The Microsoft.AspNet.SignalR.Client.Transports namespace
includes the following classes that you can use to specify the transport.

1.       LongPollingTransport

2.       ServerSentEventsTransport

3.       WebSocketTransport
(Available only when both server and client use .NET 4.5.)

4.       AutoTransport
(Automatically chooses the best transport that is supported by both the client
and the server. This is the default transport. Passing this in to the Start
method has the same effect as not passing in anything.)

What is signalR LongPollingTransport?

signalR transport used in case client is .net




SignalR Bidirectional Chat

I am looking to replace IBM MQ pub/sub  with SignalR