Tuesday, May 10, 2016

How do you transfer databases between two SQL Servers?

You can do it in a couple of different ways but this post shows you how you may do using the Export/Import Wizard. In particular, the post shows you, step-by-step, Copying the pubs database on a developer's edition of SQL Server 2012 to a developer's edition of SQL Server 2014.





Follow this step-by-step Swaytorial.
http:/sway.com/5HClf1YMOeTAERG9

Monday, May 9, 2016

Is there an Arduino program to use with Arduino 101?

If you intend using the more recent Arduino hardware such as Arduino 101 you better use the more recent Arduino IDE 1.6.8.

In a previous post you reviewed using the Visual Studio 2015 with Arduino Extension. In this post you will learn how to download the latest version and install it on Windows 10 computer.

You download arduino-1.6.8-Windows.exe from here.


You begin installing by double clicking the executable.
Here are some of the installation time screen shots for your reference:



On Windows 10 it also adds a desktop App to the All Apps menu.

You launch it by double clicking the shortcut or the desktop app or the shortcut in the installation folder.
 
Click Tools in the main menu to find the Board Manager link ass shown. In the drop-down you can see the various hardware that can be accessed.

Click Board Manager... to open another drop-down. Scroll down to view the Arduino 101 by Intel.

That's all.







Saturday, May 7, 2016

What are two ways to access Disk Management window in Windows 10?

You may need to access and manage your disk for partitioning; createing a VHD; trouboeshooting etc. There are two ways you can do it.

First Method:

Right Click This PC in File Explorer
  

DiskManage_00
  
 
Now click Manage. Computer Management window is displayed as shown. Note that you can get to this window    by typing in Computer Managment in I'm Cortana search box.


   DiskManage_01

  
Click Storage | Disk Management under the Computer Management(Local)   Pane
  
Disk Management window opens as shown.


DiskManage_02

Method 2

Type Disk Management in the Cortana's I'm Cortana Ask me anything as shown.
 

DiskManage_03
  
Click on Create and format hard disc partitions
Disk Management windows is displayed.




Friday, May 6, 2016

How do I work with Apache Cordova using Visual Studio 2015?

Intel XDK has great resources for HTML5 Web apps targeting mulitple platforms. Additonally it has debugging support for iOS and Android devices but not for Windows platform.

The free version of Visual Studio 2015 called the Visual Studio 2015 Community has excellent support for everything from web to data; on-site, cloud and hybrid applications including Business Intelligence. This support is out of the box for Windows platform. However, for open source and third party there are extensions that can be used.

You can add extensions to work with Apache Cordova based apps. Here are some of the extenions presently available online.

The Cordova Multiplatform is well suited for HTML5 but the language used is TypeScript. I am not sure if there is one in JavaScript.



More information here.

Wednesday, May 4, 2016

What is the difference between Arduino UNO and Arduino 101?

First of all Arduino (iconic name) is common to both of them and both of them use the same kind of connectors and periferals.

Arduino UNO used the ATmega 328 processor but the heart of Arduino 101 is an Intel Curie board with two cores, an x86 (Quark) and an ARC Argonaut RISC Core). These two cores enable high performance and low power-consumption.

Arduino UNO adds on-board Bluetooth Low Energy and 6-axis accelerometer / gyroscope capabilities. This means Arduino 101 is more powerful than Arduino UNO in terms of remote (Bluetooth) operation and accelerometer capability. Arduino UNO has no such capability.

In order to access Arduino UNO remotely you would need a Wi-Fi shield.

Arduino 101 has libraries for the following embedded peripherals :

CureBLE (to control Bluetooth Low Energy module)
CurieIMU(to control the 6-axis accelerometer + gyro)
Curie Timer One (to control Timer functions)

The above libraries are installed with Intel Curie core.

In order to work with the Arduino 101 you would need Arduino 1.6.7 software or later.

In my previous post you have seen how to work with Visual Studio 2015 Community for Arduino. You can use Visual Studio Community with Arduino 101 as displayed here:


VS2015_Arduino101.jpg
In my next post I will discuss how to install the latest version of Arduino to work with Arduino 101.

Monday, May 2, 2016

How do you create a Arduino Project in Visual Studio 2015 Community?

Arduino has a number of hardware products (microcontrollers. SoC, etc) that can be used for various end uses including the Internet Of Things (IoT).

Visual Studio can be used to create Arduino projects wherein the application created using the Visual Studio can be used to control like in robotics, garage openers, light dimmers, etc. to mention a few.

The more recent Visual Studio editions that are free and well suited for Arduino projects are the two Community Editions, Visual Studio 2013 Community and Visual Studio 2015 Community.

The first thing you need is to install Visual Studio (either 2013 or 2015). If you want to know details for 'how' follow these two posts.

http://hodentek.blogspot.com/2015/07/installing-visual-studio-2015.html
http://hodentek.blogspot.com/2014/11/you-get-all-this-for-free-in-visual.html

This post considers the Visual Studio 2015 Community(VS2015C).
A default install of VS2015C does not have the 'hooks' to create a Arduino Project. You will not find it in the 'New Project' templates.

You need to install the Arduino Extension for Visual Studio 2015. You can get an idea how to do it by following this Swaytorial:
https://docs.com/jayaram-krishnaswamy/4701/install-arduino-extension-to-visual-studio-2015

Once you install this you can create an Arduino Project from File | New Arduino Project.


NewProj.png

Click and you have created a project. It is that easy.

NewArduinoProj

You just need to give a name to the project and the template is ready.
I have a few projects created with the VS2013C on my blog which you may want to review.

Analog Serial Readout
http://hodentek.blogspot.com/2015/05/debugging-arduino-from-visual-studio.html

What is a Common Table Expression (CTE) in SQL Server?

Microsoft documentation defines Common Table Expression thus,

"A common table expression (CTE) can be thought of as a temporary result set that is defined within the execution scope of a single SELECT, INSERT, UPDATE, DELETE, or CREATE VIEW statement. A CTE is similar to a derived table in that it is not stored as an object and lasts only for the duration of the query. Unlike a derived table, a CTE can be self-referencing and can be referenced multiple times in the same query.

It is unlike a temporary table (persisted) during a connection or a view persisted in the database. CTE is only in memory.

We will consider CTE's many use case scenarios in later posts and the objective of this post is to give a simple example using the Northwind database.

A CTE should have the following:
  • CTE with a CTE Expression name
  • An Optional Column list
  • A query defining the CTE

After a CTE is defined it can be referenced like a table or view and you can do all of the following statements:

  • Select
  • Insert
  • Update
  • Delete
It can also be used in defining a view by providing the columns.

Now let me define CTE using the Employees table in Northwind. The example is just to show the syntax as the result can be obtained from a single query without using CTE.

USE Northwind
Go
---define the common table expression
WITH NEmp_CTE (FirstName,LastName,CITY)  /*Name: Nemp_CTE, Column List:FirstName, LastName,City*/
AS
---define the CTE query
(SELECT FirstName,LastName,City
from Employees
where City in ('Tacoma','London')
)
---Use it in a Select Query
SELECT LastName,FirstName,CITY
From NEmp_CTE
where LastName <>'Buchanan'
go

The response to this query is:

Note: The response such as the above does not really need a Common Table Expression but the point was to show the construction of the Syntax used for CTE. In fact, it is to make complex queries more readable.