Skip to main content

Posts

Install node.js using NVM and Homebrew on Mac OS X

Reference:http://dev.topheman.com/install-nvm-with-homebrew-to-use-multiple-versions-of-node-and-iojs-easily/ Less than a month ago,  iojs  was released (multiple releases followed) and 6 days ago, the v0.12.0 of  node  was released. I still had the same v0.10.x (can’t remember the patch 🙂 ) of node on my computer I installed a few months ago … As a nodejs developer, I decided it was time  to get rid of my old version  and switch to  nvm  so that I could test my projects (websites and node modules) on different engines and versions – moreover not to be stuck in the case some module should only work on one or an other … This post is more a reminder for future me when I’ll make the install again, though it could help some people. First, you’ll need  Homebrew . If you’re a MacPorts user (or a Linux user), I assume it’s nearly the same, you may even have your own way which is faster and better, no need to troll 😉 – for Windows us...
Recent posts

WPF: Simple TimePicker User Control for WPF

Hey Guys! WPF gives us DatePicker but it doesn’t give us TimePicker. I tried to create a very simple TimePicker user control.   And the bumper offer is that it is free. Use it wherever you want. J Hope this will help you a lot.   XAML Code:   < UserControl  x : Class ="Restaurant.Reservations.UserControls.ucDateTimeUpDown"               xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"               xmlns : x ="http://schemas.microsoft.com/winfx/2006/xaml"               xmlns : d ="http://schemas.microsoft.com/expression/blend/2008"               xmlns : mc ="http://schemas.openxmlformats.org/m...

WPF-MVVM: RelayCommand Implementation

In WPF if we are implementing MVVM pattern then we need to play with Command rather than Events. You can use ICommand interface to create each command class. Implementation of ICommand in a class gives you CanExecute(), Execute() methods which take part in the action performed by Command.   Rather than making Command Class for each Command we can implement a generic Relay Command to get Command. Below is a RelayCommand class that we will implement.   ///   <summary>      ///  To register commands in MMVM pattern      ///   </summary>      class   RelayCommands  :  ICommand     {          readonly   Action < object > _execute;          readonly   Predicate < object > _canExecute;  ...