Featured

Coloring on the Microsoft Surface using Sketchbook

Lets face it coloring pictures gives anyone a some sense of satisfaction. You may deny it but deep down you know that even though you may be wasting time in this hobby there is at little a miniscule bit of satisfaction you get out of it.
My toddler who is now 3 loves coloring, and sometimes wants me to color with her. Sometimes we do separate pictures at the same time, or we do different parts of the same picture together.
Added to this added coloring is a growing fad and I have seen numerous coloring books geared towards adults to satisfy this hobby at the stores.
So along these lines I would have expected the Surface to be excellent at this. It comes with a Pen, and so there should be some really good apps for coloring. Which is what I thought. Although there are apps, none of them are good or give the same satisfaction as coloring on paper.
So here is a tip you can use to satisfy your coloring urges.
You need 2 things
1. An app called Sketchbook by Autodesk
2. Google Image Search.
Sketchbook is a wonderful app you use for sketching. drawing etc. I use it to make wireframes of screens, and UI mockups.
Sketchbook supports layers. So here is what I do for coloring.
  1. Do a google image search to find a  coloring template you want to use. For example this.
  2. Once you find the image you want, copy it.
  3. In Sketchbook open the layers panel.
  4. image1
  5. In the Layers Panel choose paste from the layers menu
  6. image2
  7. This will paste a template for you to color on
  8. image3
  9. Add new layer above and then start coloring.
  10. Change the new layers blend mode to darken so that the outlines show through the new layer.
  11. Image4

Here is a coloring my little one did.

Image5

Programatically Adding Azure AD Groups to SharePoint Online

In order to add a user to SharePoint online, you need to EnsureUser first.

I.e. through code

var user = Web.EnsureUser(userName);

clientContext.Load(user);

clientContext.ExecuteQuery();

The above code works for users, but as of recently has started failing to Ensure AzureAD groups. The reason to me is unknown.

The solution I have found Is not to Ensure the user / Group by their Login Id, but instead use their Claims id.

Evolution of Anonymous Functions in C#

Most of the time when we use a feature of a language we are not really aware of the evolution of that feature, how that feature has changed over time to make it easier to use. C# now being well over 15, anonymous functions is one such feature. Today most of us write
()=>{ //method content here };
without realizing that there has been a certain evolution over time of the above to make it easy to use as it is today.

This code snippet in the “docs” (linked shows a good example of how anonymous functions have evolved. Full details

delegate void TestDelegate(string s);
static void M(string s)
{
Console.WriteLine(s);
}

static void Main(string[] args)
{
// Original delegate syntax required
// initialization with a named method.
TestDelegate testDelA = new TestDelegate(M);

// C# 2.0: A delegate can be initialized with
// inline code, called an “anonymous method.” This
// method takes a string as an input parameter.
TestDelegate testDelB = delegate(string s) { Console.WriteLine(s); };

// C# 3.0. A delegate can be initialized with
// a lambda expression. The lambda also takes a string
// as an input parameter (x). The type of x is inferred by the compiler.
TestDelegate testDelC = (x) => { Console.WriteLine(x); };

// Invoke the delegates.
testDelA(“Hello. My name is M and I write lines.”);
testDelB(“That’s nothing. I’m anonymous and “);
testDelC(“I’m a famous author.”);

// Keep console window open in debug mode.
Console.WriteLine(“Press any key to exit.”);
Console.ReadKey();
}
}

Moving an Azure VM across Subscriptions (as of Feb 2018)

Recently i had to copy/move an azure VM across subscriptions and was looking for an easy way to achieve this.

I came across this good post by Laurelle on how to do just this. However the thing is as with most things Azure, the azure landscape has changed so this is an update to the good work done by Laurelle.
And since things might change again in Azure this post is good as of Feb 2018
So if you want to copy/move a vm across subscriptions here are the steps.

Step 1: Copy/Move the vhd across blog storage accounts

Follow Step 1 of Laurelle’s post.

 

Step2: Create a Disk from a VHD

Using the new Portal, search for Disks in the “All Services” Category

<

Withing Disks choose to create a new Disk.
Fill in all the required information as below, however for Source type choose Storage Blog,
and for Source Blob browse to the vhd image you copied.

 

Step 3: Create the VM from the Disk

Once the disk is created, selected it, and from the overview blade select “Create VM”
This will bring up the Create VM wizard in Azure which you can then follow to create your VM

The Journey of this Blog

I was looking back at the journey of this blog and how it was hosted recently as I finally moved it to WordPress, and thought its journey was interesting.

This blog has come a long way as it has now been hosted on 3 different blog engines. Originally I blogged on geekswithblogs.net/tariq this was around 2004 I think (I could be mistaken). 2 years later Community Server had just come out, it was the first ever blog engine running on .net. So being the tech adventurer that I am, that is what I did – I mean, I set up Community Server 2 and migrated my blog content to it, about 5+ years later I changed the blog engine to blogengine.net, and now in 2016 its on WordPress.
So

Community Server 2 -> BlogEngine.net -> WordPress

SharePoint Farm Reporting Services Mistake #1

Made this mistake when configuring a SharePoint Farm with a dedicated Server for Reporting Services

-i.e. assumed that the Reporting Service Add-In is not required on each of the web front-ends, when infact is needed

“From MSDN

“If you are integrating Reporting Services with a SharePoint farm that has multiple Web front end applications, install the add-in to each computer in the farm that has a Web server front-end. Do this only for Web front ends that will be used to access report server content.”

https://msdn.microsoft.com/en-us/library/aa905871.aspx

&nbsp;