Continuing on with our Redis for .NET Developer, the Redis String Datatype is also used to store integers, float and other utility commands to manipulate strings. Redis String Datatype using Integers In Redis float and integers are represented by string. Redis parses the string value as an integer and the neat thing about them is […]
Continuing our series on Redis for .NET Developer, we will be looking into the basic string datatype that Redis provides. First to be clear, Redis is more than just a string cache or to store your serialized objects, it is a data structure server, but nevertheless the basic understanding of using strings in Redis will […]
In the second blog post series “Redis for .NET Developer” I will show how we will use C# to connect to Redis. If you want to learn how to install Redis, visit my previous post on Intro to Redis for .NET Developers – Installing Redis on Windows. We will be using StackExchange.Redis library to connect […]
What is Redis – Installing Redis on Windows Redis (REmote DIctionay Server) is a very popular open-source, networked, in-memory, key-value data store, sometimes referred to as a data structure server which also comes with optional durability. Redis is well known for high performance, flexibility, provides a rich set of data structures, and a simple straightforward […]
Visual Studio 2013 provides Task Runner Explorer for us to run Grunt & Gulp task right inside of Visual Studio. One can download Task Runner Explorer from Visual Studio Gallery Once installed we can now use npm to install grunt for us in our node web project.
1 2 3 4 5 6 |
npm install grunt --save-dev //the command above will install into our package.json file "devDependencies": { "grunt": "^0.4.5" } |
We now will create a new Gruntfile.js […]
I just got back from MVP summit from Seattle, and there were lots of new and cool stuff about the future of .NET and web development with vNext. I would strongly to suggest that you join the virtual developer Microsoft conference Connect(); http://www.visualstudio.com/en-ca/connect-event-vs On the 12th you will have keynotes from Scott Gu, Scott Hanselman […]
Here is a quick C# tip, when using string compare don’t use
1 2 3 |
var str = "Hello"; if(str.ToLower() === "hello") |
use the Equals and StringComparison.InvariantCultureIgnoreCase enum.
1 2 3 |
var str = "Hello"; if(str.Equals("hello", StringComparison.InvariantCultureIgnoreCase)) |
The thing you need to note is which rules are appropriate current culture, the invariant culture, ordinal or another culture entirely. One can create the compare from StringComparer.Create(culture, true)
Node Tools for Visual Studio is currently in Alpha 1.0 and its free and opensource, in this post I will show you how to install Node and Node Tools for Visual Studio (NTVS). First lets install Node.js Download Node from http://nodejs.org/ The currently version is node-v0.10.26-x64 Step one lets run the msi that we just […]
Here is another C# tip. Most of the time when you are trying to get a value from dictionary you would try to check if the key exist or not something like.
1 2 3 4 5 6 |
if(dictionary.ContainsKey(key)) { var value - dictionary[key]; //do some stuff } |
But one can use TryGetValue
1 2 3 4 |
if(dictionary.TryGetValue(key, out value)) { //do stuff with value } |
The benefit of using TryGetValue is that the dictionary is synchronized, there is no race condition.