Saturday, March 11, 2017

Essential Visual Studio 2017 Tools & Extensions

Web Essentials 2017
Wrapper for many handy extensions such as File Nesting, Image Optimizer, Markdown Editor, Open Command Line & HTML Tools

Productivity Power Tools 2017
Another wrapper for extensions like Ctrl+Click GoTo Navigation, Power Commands for Visual Studio & Copy As Html

XAML Styler 
Format your XAML on save - consistent and readble XAML Style implementations

Cleanup and format your code. Multiple language support

NUnit 3 Test Adapter
Run NUnit tests in Visual Studio
...also consider xUnit unit testing

Cloud Explorer for Visual Studio 2017
View your cloud resources, inspect properties, and perform key developer actions from within Visual Studio

Central access to all ResX-based string resources in your solution

..any other essential extensions you can't do without? Share in the comments below.

Saturday, March 4, 2017

Xamarin Forms: ToolbarItem with Bindable IsVisible Property

It's fairly typical for toolbar items to change depending on the state of the model that the view is bound to (quite another thing if it's considered good UX).

Unfortunately Xamarin Forms doesn't have an IsVisible property on it's ToolbarItem control, so I had to hunt for a sample implementation.

A found this handy thread on the Xamarin forums.
Basically create a custom control that inherits from ToolbarItem, add a bindable IsVisible property, and add /remove the toolbar items as the property changes.

I made some minor modifications, and added the source code here

Happy Coding :)

Daily Links 4 Mar 2017

The 12 Factor App

Building Single Page Applications on ASP.NET Core with JavaScriptServices

Realtime Databases with the Realm Mobile Platform

Penny Pinching in the Cloud: Running and Managing LOTS of Web Apps on a single Azure App Service

Xamarin Forms ListView Grouping

Xamarin.Forms Android Selected & Unselected Tab Colors

Xamarin Forms Tab Badge

Azure App Service Secrets and Web Site Hidden Gems

What is scope and closure in JavaScript?

Writing Jasmine unit tests in ES6

Getting Started With WebAssembly in Node.js

Parsing And Serializing Large Objects Using JSONStream In Node.js

Azure App Service Authentication in an ASP.NET Core Application

Friday, January 6, 2017

Sentinel Mutant Registration Facial Recognition System with Xamarin Forms and Microsoft Cognitive Services

First off, this is not a step by step tutorial for adding facial recognition to your cross platform xamarin mobile apps. For that, head on over to a blog post from Pierce Boggan: "Adding Facial Recognition to Your Mobile Apps". For another more in-depth article, head on over to "Cognitive Services - Face and Emotion Recognition in Xamarin.Forms with Microsoft Cognitive Services" from Alessandro Del Sole.

What it is, is a fun app that implements some of the face api from microsoft cognitive services - where you can subscribe to really nifty api such as face and emotion recognition. The free plans are really generous - 30k calls per month for the face api.

First and foremost, all the code can be found on github here.

Displaying Screen Shot 2017-01-06 at 5.55.11 PM.png

Introducing: Version 1 of the sentinel mutant registration program

Related image
Because of Xamarin Forms, the sentinels can be running Android, iOS or Windows. The sentinels above look like they prefer Hololens.

All the MCS Face Recognition related code can be found in the share library FaceApi folder.
You will need to implement your own ApiKeyProvider class that supplies the MCS Face Api key that you have registered.

What can you do?

  1. Clear all face registrations. This will call the DeletePersonGroupCommand, which basically deletes all face recognitions within an identified group (in this case: all the mutants)
  2. Register a new mutant. You can do this in one of two ways. Scan their face using the onboard camera, or select from a picture the device has on file. This is done via the RegisterFaceCommand
  3. Identify a mutant. Does your sentinel program need to recognize mutants for capture - this function will scan a face using the camera or file on device, and confirm whether the mutant has been registered or not. This is done via the FindGroupPeopleCommand
  4. Scan mutant. Scan a face for facial attributes such as age and  gender. Done via the DetectFaceCommand
Browse the code and add your own sentinel directives. Just don't tell Mr Eisenhardt of it's existence, lest he and the Brotherhood switch the code to hunt humans ;)