41.5 inch UHD 4K TV as a Monitor

So I made the move and bought myself a really cheap 41.5 inch UHD 4K LCD TV from Dick Smith for $449 AUD while it was on special, then the next day I checked the priced it went up to $599 AUD.

4K_Screenshot_04

So the reason I bought this TV is to use it as a monitor replacement for my dual 24 inch Full HD LCD setup. The TV was extremely light, I had no problems unboxing it by myself and inside it came with a standard remote and stand. The TV has 3 HDMI inputs and only 1 HDMI 2.0 port that can do UHD 4K at 60Hz 3840 x 2160 resolution. Continue reading

Surface Pro 3 for General and SharePoint Development

I bought my Surface Pro 3 in April 2015 as my dedicated development computer for .NET and SharePoint development. The Surface Pro 3 has 8GB of RAM, 512GB of storage and i7 CPU. Compared to my previous desktop setup, I had 16GB of RAM, 2TB of HDD Storage, and AMD Quad Core CPU.

Surface-Pro-3 Continue reading

SharePoint 2013 Promoted Links Target=”=” Issue

Recently I had a colleague looking into an issue with Promoted Links not opening into a new tab in SharePoint 2013. So I thought I will look into it and see how it could be fixed using a bit of JavaScript.

To test this problem I have created a Promoted Link called My Links and added two items. Create an new item for a link to google.com and bing,com web site:

sharepoint_promoted_link_issue_01

When you click on either one of the tiles it will open a new tab, don’t close the tab and return to the tab where the Promoted Links were. Now click on the other tile and you can see that it open in the same tab as the previous tile. Continue reading

SharePoint 2013: Retrieving User’s Profile using Client Side Object Model

SharePoint-logo-1024x325

Using the SharePoint Client Side Object Model you can retrieve a specific user’s profile from SharePoint. I have put together a simple console application in Visual Studio and I have described each line of code below.

On the 1st line of code instantiate the ClientContext class by passing your site’s URL.

On the 2nd line I instantiate PeopleManager class which provides methods for operations on people in SharePoint.

On 3rd line I instantiate the UserProfilePropertiesForUser class by passing the client context, the user’s name and an array of strings containing the property names.

On the 4th line I use the GetUserProfilePropertiesFor method from the PeopleManager and passing it the UserProfilePropertiesForUser object I have created earlier on. This method will return a list of string values that we can use a foreach loop to iterate through the values.

var clientContext = new ClientContext("http://yoursite/");

var peopleManager = new PeopleManager(clientContext);

var userProfile = new UserProfilePropertiesForUser(clientContext, "domain\username", new[] {"FirstName", "AboutMe", "Manager"});

var profileProperties = peopleManager.GetUserProfilePropertiesFor(userProfile);

clientContext.ExecuteQuery();

foreach (var str in profileProperties)
{
	Console.WriteLine(str);
}

Console.ReadKey();

AngularJS: Custom Directives – Using Isolated Scope

AngularJS_logo.svg

How do you pass data to your directive?

So now we have covered the most basic part of custom directives, and now you should learn how to pass data to it.

You can simple access the current scope from a controller and get the data this way.

JavaScript:

angular.module('app', [])
.controller('HelloWorldController', ['$scope',function($scope) {
    $scope.message = "This is a wonderful world we live in!"
}])
.directive('helloWorld', function () {
    return {
        restrict: 'E',
        templateUrl: 'template.html'
    };
});

Html Code:

    <body ng-controller="HelloWorldController">
        <hello-world></hello-world>
    </body>

Template:

Your message:
<b>{{message}}</b>

And then in your template you simply use the curly braces to display the message from the current scope. Continue reading

AngularJS: Custom Directives

AngularJS_logo.svgWhat is a custom directive?

In my last post I’ve described what’s a directive and the types of directives available in AngularJS. But in AngularJS you’re not restricted to what is available, you have the ability to create you own directive too.

What are the ingredients that makes up a custom directive?

A very basic custom directive will contains the module.directive API to register it. The first parameter is the name and the second parameter is the function that returns configuration object.

Below is I have created an directive that is an element with a template that display a simple Hello, World! message in html.

angular.module('app', [])
.directive('helloWorld', function () {
    return {
        restrict: 'E',
        template: '<b>Hello, World!</b>'
    };
});
<hello-world></hello-world>

Let’s break it down. Continue reading

AngularJS: Directives

AngularJS_logo.svg

What is a Directive?

AngularJS Directives is a method of manipulating the DOM and there is two types of directives, a behavior modifiers and reusable components.

Behavior Modifier Directive

This type of directive will add or modify existing behavior of the UI. Some of these types include ng-show which show or hide parts of your html code, and ng-include which allows you to include a html code from another file to be rendered in an existing UI.

Reusable Components

This type of directive can render a new html code with in your page, and it can have business logic attached to it. Your typical reusable directive would be your Tab and Accordion directives.

ng-show example

This is an attribute directive which means you can only use it as attribute in any elements. For example below I am going to you it in my DIVs.

So ng-show you have to provide a condition that will resolve to true to show part of the html:

<div ng-show="condition == true">
	Hello, World!
</div>
<div ng-show="condition == false">
	Good Bye!
</div>

In my next post I am going to talk about Custom Directive, and demonstrate how you can write you own directive for your own single page application.

Ubuntu: Photography Applications

 

Ubuntu_Photography

So you’re a professional photographer or just started in photography and you’re not using Microsoft Windows or Apple Mac OS X, but you’re cool techy guy like me that only use Ubuntu or other Linux Distributions that their dedicated operating system.

I show you some of the useful application I have found and used and hopefully the information I have shared here will be valuable to you!

Photo/Image Management

I use Shotwell for managing all my images that I upload from my DSLR camera. One of the reason that I am using it is because I store all my images on a remote server and it allows me to access my network shared folders.

Ubuntu_Photography_1

One of the feature I like most is the ability to batch upload my images to my Fickr or Facebook account.

When you import your photos, they are organised into folders of the date it was taken or created. You can configure it to allow the use of external image editing software like GIMP, but the Shotwell has some very basic editing features for simple touch ups.

You can check it out here for more details. Continue reading

SharePoint 2013: WebParts and Basic AngularJS

 

SharePoint2013_AngularJS_Logo

In this post I am going to show you how to apply AngularJS to your Visual WebParts in SharePoint.

Create a SharePoint 2013 Solution.

From Visual Studio menu File->New->Project and then use the SharePoint 2013 – Empty Project Template. Name the project DemoSite1 and the solution SharePoint2013 and click OK to continue. While Visual Studio is preparing your solution why not go and make yourself some coffee!

SP2013_WebParts_AngularJS_00

Right click on the DemoSite1 project and from the popup menu select Add->SharePoint “Layouts” Mapped Folder. After you have created the Layouts folder you will see another sub folder  called DemoSite1. So in the Layouts folder create a Scripts folder, and then create another Scripts folder inside the DemoSite1 folder.

Continue reading

SharePoint 2013: How To Create A New Site Collection

To create a new site collection on SharePoint 2013 server, open Central Administration and under the Application Management section select Create site collections:

SP2013 Create Site Collection 1

Enter a Title and Description for your site, so for the title I am using Demo Site 1. Web Site Address you may select an alternative URL Path or use the default URL Path sites and then enter your URL name, for this demonstration I will use DemoSite1.

SP2013 Create Site Collection 2

Continue reading