What is Armstrong number
Armstrong number of 3 digits is an integer such that the sum of the cubes of the digits is equal to the number itself.
Fun with Visual Studio
Let’s have fun generating Armstrong Number
We find the sum of the cube of each digits
temp = num
while temp > 0:
digit = temp % 10
sum += digit ** 3
The Python logic
# Python program to check if the number provided by the user is an Armstrong number or not
# take input from the user
num = int(input(“Enter a number: “))
# initialise sum
sum = 0
# find the sum of the cube of each digit
temp = num
while temp > 0:
digit = temp % 10
sum += digit ** 3
temp //= 10
# display the result
if num == sum:
print(num,”is an Armstrong number”)
print(num,”is not an Armstrong number”)
Open up Visual Studio
then open a Visual Studio project with Python
Will try with 2 numbers
Let’s try 346
It’s an Armstrong Number
3*3*3 + 7*7*7 + 1= 371 (Armstrong Number)
We will go through lots of tricky logic and simple one with Visual Studio in Python. We see it’s very easy to implement it.
Tinkering with Hololens app
With ongoing process of development with Hololens in this article we will try to work on the code modify it to our liking
Let’s break the Hololens app
We will now work on modifying the spinning render cpp file now we need to check on which points we need to modify for Hololens rendering of the cube.
We attack the part where it is written as cube indices let’s look on changing the co-ordinates first.
static const unsigned short cubeIndices  =
2,5,0, // -x
3,4,1, // +x
0,5,1, // -y
2,3,7, // +y
0,4,3, // -z
5,6,7, // +z
Now we run the app in Hololens emulator the output is as shown below
Further modifications to continue
We find out that it’s easy to change shapes of an object and the content needs to be changed in cube renderer cpp file. With changes we can get lot of effect on the object creation.
Getting started with Python in Visual Studio2015
Python being one of the most powerful languages now with capabilities within Visual Studio 2015 we can make strikingly powerful applications
We will use Visual Studio 2015 template to create a new app with Python
We now open a project in Visual Studio with Python option
Now let’s make a simple program.we will just see fibonacci series in Python
we will use looping technique
Here is the code for it
a,b = 1,1
for i in range(n-1):
a,b = b,a+b
Click on run to see the output.
We have seen how easy it is to write Python code in Visual Studio 2015 and compile it.
Webhosting UWP app
Windows 10 UWP app is in an era where you can update a normal website completely transformed into a UWP functionality app.
Let’s check the flow how it happens
Now we remove CSS,JS and WinJS folders
Add the website in start page and URI Rules
Run the app
With help of Web hosted app we cab easily convert a normal website to UWP.
Building Hololens app with C++ template
i)To start with make sure you have installed Visual Studio 2015 update 2
We would be showing development without Unity to start with.
Currently for development from Visual Studio two languages are supported
We will be covering C++ first
Open Visual Studio first
Then Click on new project
Leave the specification as it is
Click on Ok.
The project details in solution explorer.
Select it for Hololens emulator
Now click on yes for the build
Now the Microsoft Hololens emulator will come up
The OS is starting
The main screen when Hololens emulator starts
The simulator tries to map the surroundings
The Hololens emulator in action
Now we will see the cube in action within Hololens frame
With the help of C++ and other Direct X technology we can build lot of immersive apps for Hololens experience. I hope you like my First post at TechNet with it more learning and more experience I will post my updates on this topic
Introduction to Microsoft Hololens
Microsoft Hololens is a headset that revolutionize the way we perceive the interaction with Virtual world with very intuitive experience with holographic projection.
The general interaction occurs when we interact with an object
The interaction process are
It allows us to simply look at an object like we target with our eyes hence Gaze.
It allows us to interact with the object which we are Gazing(or aiming at through our eyes).
There can be different forms of gestures
Hand Gestures Interactions tap, place and others.
The interaction with an object occurs when we are gazing at it and speak voice commands.
The Microsoft Hololens experience is driven inputs which we interact with holographic objects through Gaze,Gesture and Voice.We can bring highly interactive virtual world experience to life using Holographic projections.
The IBM Watson Developer Cloud (WDC) offers a variety of services for developing cognitive applications. Each Watson service provides a Representational State Transfer (REST) Application Programming Interface (API) for interacting with the services.
IBM Bluemix is the cloud platform in which you deploy applications that you develop with Watson Developer Cloud services.
In this part of the project you can find the advanced labs. In these labs different services are combined to build apps to show the possibilities of Watson in Node-RED.
- We would be use a widget with Trade off Analytics
Before trying these labs you should already be comfortable with Node-RED flows and how to import flows.
Node-RED is included in the Node-RED starter application in Bluemix (Bluemix is IBM’s Platform as a Service, free of charge) but you can also deploy it as a stand alone Node.js application. Node-RED can not only be used for IoT applications, but it is a generic event-processing engine. For example you can use it to listen to events from http, websockets, tcp, Twitter and more and store this data in databases without having to program much if at all. You can also use it for example to implement simple REST APIs.
There are two ways of using Node-RED
- Node-RED stand alone
- Node-RED on Bluemix (Bluemix is IBM’s Platform as a Service) Both ways are described in this article, but to save time for these labs it is recommended to use Node-RED on Bluemix.
Using The Trade Off Analytics With Node-Red
The Trade-Off Analytics service comes with a very versatile user interface widget which can be used to display the trade-off analytics results and let the user interact with them.
To use the service follow the steps:
- Sign Up for an IBM Bluemix Account https://console.au-syd.bluemix.net/registration
- Create App
- Then Choose Your App Template, Will be Creating An Web Application So I Select Web
- Then Choose Your Starting Point, for this I Am Choosing Browse Boilerplate
- You Can Select Any Of The Boilerplates, I Would Be Using Node-Red-Starter Application. This Application Demonstrates how To Run The Node-RedOpen –Source Project Within IBM Bluemix
- Create An App By Providing The Name
- After the App Is Created Go Back To The Dashbord.
- Then Add A Service Or API
- Add The Trade Off Analytics Service
- Create The Service
- After Your App Is Running Click On The App
- Click on Go To Your Node-Red Flow Editor
- Trade Off Analytics Widget Flow Constructio
Deploy the flow and point your browser at
- http://manishai.mybluemix.net/tofaw. Rendering of the widget should start and eventually yield a screen such asConclusionHere we have used a Different service in Watson which is called as Tradeoff analytics and helps us in this scenario to do analysis of different phones such as Samsung , HTC, Nokia , Sony based on their Size ,Weight and Screen and this service is added in Node Red service with Bluemix.
In this model we have seen how easy it is add different service with Node RED and add other services for Watson to see how easily we create different use case scenarios for different products and situations.
This is my second article and as my journey continues I would learn and share more.