Wednesday, May 29, 2013

Jquery Url parser library

jQuery-URL-Parser is one great utility to parse urls, and provide access to attributes, querystrings.

image

p.segment return all the pathes in the url

image

param() return all the query string and values

image

Thursday, May 23, 2013

How to: Adb install apk get error, INSTALL_FAILED_ALREADY_EXISTS

If you are a developer, and want test your new build and keeping the old settings of your app.here is the quick answer.

TRY install the new apk, you will get [INSTALL_FAILED_ALREADY_EXISTS] failure.

image

here is the trick, add the –r, will keep the old setting while applying the new app.
image

Friday, May 3, 2013

ZeroMq, pub/sub mode tutorial , how-to

following the last post, it’s extremely easy to do a pub/sub empowering the zeromq.

IN C#, we setup one socket to pub type, and bind to one tcp port. IN the Node.js and Another C# client, we can create a socket with type Sub. then subscript the topics we are interested.

 image

then in the Node.js, create one special socket sub, and remember to call subscribe with the interested topic.


image

C# subscriber code,
image

Run the app, from c#, we can see message published and received,

image

from node.js client,
image

Wednesday, May 1, 2013

Test ZeroMQ in C# tutorial

ZeroMQ comes with a lot binding, here is a quick tutorial to pickup the C# one.

Create one console application, and search Zeromq in the Nuget package, you will see one for x64 and one for x86.
image

then we can create a zemomq server and one client which send message to the server,
image

Run the application,
image

for the Node.js, we can install one module called , zmq which is the zeromq binding for node.js
image

then create one simple js code and send a message to the 5555 service,( using buffer as the encoder for utf8)
image

then run the .js
image

And on the zeromq CLR process,you can see the new message

image

 
Locations of visitors to this page