Nothing to see...

A simple blog about all things in the world that is ridikulouse.

Wednesday, February 18, 2015

Building your own coils

Personal Vaporizers have suddenly become popular, so popular in fact that in my last trip to Europe and America I noticed that 50% of smokers were vaping. When you first start getting into vaping you will probably start off with a standard kit, as your curioisity grows you'll slowly move up and up in to more technical areas. The minimum equipment you will need will be : Rebuildable Atmoizer  A small screwdriver or drill bit or anything that you can wrap a coil around Wicking Material Wire A blow torch (Butane) Tweezers  A cutting...

Tuesday, February 17, 2015

Entity Framework and Many to Many Relationship - Simple Example

If you want to do Many to Many relationship in Entity Framework the work is quite simple: Create two classes say Order and Product Establish a navigational property between the two classes  You're done.  So lets take a look at this, the following, as in the example above is Order class Public Class Order { public int ID {get; set;} public string Description {get; set;} public virtual ICollection<Product> Products {get; set;} public Order() { this.Products = new List<Product>(); } } The...

Saturday, February 7, 2015

[Solved - I think ] Visual Studio High CPU usage

Out of nowhere I started Visual Studio to get some coding happening, and it was almost unusable. I was editing a CSHTML file, and the CPU usage was through the roof. At one point the CPU usage was over 40% and my Surface Pro 3 started heating up and the only thing I could do was to shutdown Visual Studio. I don't know why this is happening I was working on the same file last night without a hitch. Here is a screenshot of task manager: I'm...

Thursday, February 5, 2015

Surface Pro Function Keys

If you are an owner of Surface Pro you may have noticed that you don't have quick access to the function keys. For the general consumer the settings of the function keys are less useful and the standard media and other options are far more convenient. However, if you are a developer you tend to always try and reach for the function keys (e.g build, run etc...). What you can do is press the    Fn    key +   Caps   key to lock the function key. Then you no longer need to press the Fn key to access the Function...

Tuesday, February 3, 2015

Create your own Android Character

There's a new site out that allows you to create your own Android Character. You can choose from a range body shapes, outfits, and accessories to try and mimic an Android that looks just like you, your friend, or your family member. Or maybe make character of who you think you are, to check it out click here : https://androidify.com/en...

Samsung Galaxy S5 - What I want

I'll soon be in the market for a new smart phone, and I'm eagerly looking forward to what Samsung has been working on under the covers. The last set of rumours indicated that the Galaxy line up is being re-designed from the ground up. This is welcome news, since I didn't get a new phone this year because S5 just didn't cut it enough for me to move from my HTC One M7. So if Samsung is looking to re-design this from the ground up, then here is my wish list: TouchWiz The only Samsung Phone that I have liked to date is the Samsung Galaxy Nexus and...

Visual Studio Code Snippets

I've been working with Visual Studio for years, and all this time I have not come across this feature till now. Visual Studio has built in code snippets, in order to access them you need to first place your cursor where you want some code to be pasted and then you need to press CTRL + K + CTRL X I haven't been able to take a screenshot of this, but what will happen is a dialog box will appear with a set of folders. Simply use your cursor keys to navigate to a folder (in my case it is Visual C#) and then press enter, this will reveal the snippets....

Stuck trying to modify the ApplicationUser and Multiple DbContexts

When you are trying to update the AccountController in ASP.NET MVC - to enhance the ApplicationUser or another related entity during Registration you may quickly realise that the AccountController doesn't have a DbContext for you to use. So like anyone, and looking at the other sample controllers you'll probably define something like this: ApplicationDbContext db = new ApplicationDbContext(); You then write your code, everything compiles and...

Monday, February 2, 2015

Get the Current Logged in user

In ASP.NET MVC if you are using Asp.Net Identities, you will need to at times get the current logged in user. You may need to do this to determine whether the current logged in user has access to view, create, modify records etc... First of all this can be only completed in the Controller. If you need the user inside of another class, you will need to pass this through to the class method/function etc... In the controller, header set the following properties: protected ApplicationDbContext Db { get; set; } protected UserManager<ApplicationUser>...