Posts

Showing posts from June, 2015

Create .gitignore for Visual Studio

Image
One of the first thing you have to do when you are creating a git repository is to create a .gitignore file that tells git to ignore the files specified in the .gitignore file.  Since Visual Studio produces all kinds of files it could take a while if you tried to create a .gitignore file from scratch.  Well there's a website that will generate a .gitignore file for you.  It's called gitignore.io   all you have to do is type in the IDE in this case it's VisualStudio without any spaces and the website will generate a .gitignore file for you automatically. Step-By-Step Instructions : Type in the URL https://www.gitignore.io   2. In the text box, type in "VisualStudio" without the double quotes 3.  Then click on the "Generate" button 4.  That's it, a .gitignore file is generated for you, save the file and put it at the root of your Visual Studio repository and you will ensure that the only thing that will get committed are the source codes Note:  You can

Hadoop Part 1: Install Hortonworks HDP Sandbox

Image
In this blog I am going to show you how to install the Hortonworks  Hadoop virtual machine on your local machine using Oracle's VirtualBox .  It is free so it's the best way to learn Hadoop if you are just starting out. Step-by-Step Instructions : 1.  Type in the url http://hortonworks.com/products/sandbox-instructions  , you will be taken to the Hortonworks sandbox download page. 2.  What you want to do is download the latest stable release.  Choose the virtual machine version that is for VirtualBox at the time of this writing the file should say VirtualBox(HDP 2.2.4 - 5.4 GB).  It's going to take a while. 3.  Now we are ready to prepare our Oracle VirtualBox for the sandbox, first open the Oracle VirtualBox application, then select "File" → "Preferences" 4. Select "Network", then select the "Host-only Networks" tab, then click the "+" icon to add a new host network adapter.  We are going to create a host-only network adapt

ASP.NET MVC 5 From Scratch : Using Conditional Comments to Support Older Versions Of IE

Older versions of IE have problems supporting the newer JavaScript libraries and HTML5 tags.  In the previous blog we've created responsive layout in ASP.NET MVC.  In this blog we are going to use conditional comments to support older versions of Internet Explorer (IE).  Since IE 9 seems to be the cutoff point we will use it in our conditional comment base condition to decide whether we want to do something different to support IE.  We will be working with the MvcApp project. Step-By-Step Instructions : 1.  Open the MvcApp application 2.  Open the _Layout.cshtml 3.  Inside the <head> tag <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <![endif]--> The code above

ASP.NET MVC 5 From Scratch : Create A Responsive Layout With Bootstrap

Image
In our previous blog we created a simple _Layout.cshtml file that does not have any markup just to make things simple.  In this blog we will use Bootstrap to make the layout look more professional and responsive, so that it can be viewed in any screen size.  The previous layout looks like screenshot below. The Bootstrap version will look like the screenshot below. Step-By-Step Instructions: 1.  Open the MvcApp project 2. Open the BundleConfig.cs file in the App_Start folder and type in the following code using System.Web; using System.Web.Optimization; namespace MvcApp { public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/jquery", "https://ajax.googleapis.com/ajax/libs/jquery/ 2.1.4/jquery.min.js").Include("~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/bootstrap","https://maxcdn.bootstrap