Tuesday, December 30, 2014

2014 was a mixed year

2014 was a mixed year. I lost my brother Dr. Vijaya Raghavan Krishnaswamy, a neuro-surgeon by profession. He left a void that cannot be filled.

I did not complete the book I was writing.

Regarding the blogs I did quite well with a record number of posts.
                                                 Year   Posts
Hodentek.blogspot.com           2013   94
                                                 2014   246

HodentekHelp.blogspot.com.  2013.  17
                                                 2014   56

HodentekMsss.blogspot.com   2013   34
                                                  2014  48
 
HoentekMobile.blogspot.com  2013   13
                                                  2014  

I started a new blog in 2014- http://hodentekPlus.blogspot.com.

I also found that a certain person was pilfering (http://hodentek.blogspot.in/2014/12/domain-name-service-dns-and-dns-changer.html) entire content from blog, my hardwork of about 10 years. I complained to Google without any success. I suppose this is not on Google's priority. Google wants every post that is stolen with proof of content stolen. There were over 900 posts in my blog and you can imagine the work involved.
 

Sunday, December 7, 2014

What is LINQ?

We know that a query is a question we pose to the database to retrieve some information that we would like to know. For example, in a database that consists of men and women, you may want to know how many men and how many women. Let us go a step further and say that there are people of all nationalities in the database of men and women. You may want to know how many women who hail from Europe are there. This is only filtering of the information but a query can much more complex. This is of course querying a database, let us say a relational database such as the SQL Server where you use the Structured Query Language(SQL), a special language you have to learn.

All data are not in relational databases and they could be in some kind of an XML document, a web service or something else. For example, in order to find some filtered content in an XML document you would use a language called XQuery which is not the same as SQL. This means there is need to learn another query language.

Beginning with Visual Studio 2008 and .NET Framework 3.5 Microsoft introduced LINQ which stands for Language-Integrated Query an innovation that made it possible to query a SQL Server database, an XML document, Web Services etc with a single lanugage and it is a first class query language.

In Visual Studio you can write LINQ in both VB and C# for any collection that supports IEnumerable or the generic IEnumerable interface (or to put it simply a collection in which one can go through the collection item by item).

For example you may have a list  of names ("John", "Tom", "June", "Diana") etc.  or  the number of rows in a database table , etc. and they can be queried using LINQ.

Need to query SQL Server with LinqPad, review the following posts:

http://hodentekmsss.blogspot.com/2014/12/learn-querying-sql-server-using-linq.html
http://hodentekmsss.blogspot.com/2014/12/learn-querying-sql-server-2012-using.html

Tuesday, December 2, 2014

What are the different frameworks you can use with Intel XDK App Designer project?

In the latest version of Intel XDK you can create one of four frameworks to work with. They are,
  • App Framework
  • BootStrap 3
  • jQuery Mobile
  • TopCoat
App Framework
Basically used for mobile devices and supports native OS such as Googl Android, Apple iOS, RIMBlackberry and Microsffot Windows 8. It has no outside dependencies and optimized for speed. It is Javascript library for mobile HTML5 apps.
http://app-framework-software.intel.com/

Bootstrap 3
It is an open source UI library mostly used for web. Although not meant for mobile devices it still works OK. It is heavy on CSS3 and uses jQuery
http://getbootstrap.com/

jQuery Mobile
Uses JQuery and meant for mobile and optimized for touch. Use HTML5 for UI design for rsponsive weeb and apps (smartphone, tablet and desktop).
http://jquerymobile.com/

Topcoat
Pure Open source CSS for clean mobile and web apps. Optimized for performance with no other dependencies. It has its origins in Adobe design.
http://topcoat.io/

Thursday, November 27, 2014

Can you access ODATA with PowerShell?

Yes you can. However you need to use PowerShell Version 4.0. On the computer where this post is created PowerShell 4.0 is installed by default (Windows 8.1). But if you are using Windows 7.0 read here:

http://hodentekhelp.blogspot.com/2015/03/how-do-you-install-windows-powershell.html

Here is an example.
I take the example of using the ODATA service provided by ODATA.Org
Here is the URL of this service:
http://services.odata.org/OData/Odata.Svc

If you were to type this into you browser,you would see this.



This shows meta data of the collection in this service

Launch Windows PowerShell with elevated permissions.

Verify you are using Version 4
--------
PS C:\Windows\system32> $PSversionTable.PSversion
Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1

------------

Declare a $Categories variable as shown
$categories=Invoke-RestMethod http://Services.odata.org/OData/OData.svc/Categories
You will be returned to the next line if there are no errors
Let us see what is in categories
---------
PS C:\Windows\system32> $categories
id       : http://services.odata.org/OData/OData.svc/Categories(0)
category : category
link     : {link, link, link}
title    : title
updated  : 2014-11-27T21:11:29Z
author   : author
content  : content

id       : http://services.odata.org/OData/OData.svc/Categories(1)
category : category
link     : {link, link, link}
title    : title
updated  : 2014-11-27T21:11:29Z
author   : author
content  : content

id       : http://services.odata.org/OData/OData.svc/Categories(2)
category : category
link     : {link, link, link}
title    : title
updated  : 2014-11-27T21:11:29Z
author   : author
content  : content
------------------
Looks like there are three categories
Let us look at the titles and link of these categories
-------------
PS C:\Windows\system32> $categories.title
type                                                        #text
----                                                        -----
text                                                        Food
text                                                        Beverages
text                                                        Electronics

PS C:\Windows\system32> $categories.link
rel                                     title                                   href
---                                     -----                                   ----
edit                                    Category                                Categories(0)
http://schemas.microsoft.com/ado/200... Products                                Categories(0)/Products
http://schemas.microsoft.com/ado/200... Products                                Categories(0)/$links/Products
edit                                    Category                                Categories(1)
http://schemas.microsoft.com/ado/200... Products                                Categories(1)/Products
http://schemas.microsoft.com/ado/200... Products                                Categories(1)/$links/Products
edit                                    Category                                Categories(2)
http://schemas.microsoft.com/ado/200... Products                                Categories(2)/Products
http://schemas.microsoft.com/ado/200... Products                                Categories(2)/$links/Products






Tuesday, November 25, 2014

What is a Easy Transfer Cable? or do you need to go from XP to Windows 7?

You have already heard that Windows XP support is history. If not, read the following:

http://hodentek.blogspot.com/2014/01/windows-xp-support-anit-malware-support.html

After Windows XP came a number of OS Upgrades the most important ones being Windows Vista, Windows 7, Windows 8, Windows 8.1 and soon Windows 10. Of course there were two different architectures as well x32bit and x64bit.

If you had had a Windows XP and migrating to Windows 7 you would need a easy tool. Looks like Windows Easy Transfer was utility made just for this and should be available in Windows 7.

With this utility there were three ways you could transfer stuff between two computers as shown in the opening screen of Windows Easy Transfer (migwiz.exe).



If you were without a network connection you could use the Easy Transfer Cable or create a file on a external HD or a USB Flash drive.

Well what is this Easy Transfer Cable?

It is a USB Male-to-Male connector with an intervening electronic device that allows fast transfer between the connected computers while providing short-circuit protection.

You could buy this cable from a number of vendors such as Belkin (Model FSU258, FSU279),  Dynex (DX-C113231), and many others.

Here is a picture of one of the Belkin cables.
 Here is a listing of transfer support it provides.

Read more here:
http://plugable.com/products/usb-easy-tran/

Friday, November 21, 2014

How can I install PHP on Windows 8.1?

In order to install PHP on your machine you should have the local web server working which is IIS 8.0 on a Windows 8 OS.  if it is not activated you can activate it from Control Panel (Turn Windows features on or off ).


If the IIS 8.0 is activated you should be able to see the following screen when you access  http://localhost in  browser on your computer.

For the current laptop the following is the response:



Assuming you had no problem activating IIS 8.0 we can move to the next step of installing PHP 5.x.

Downloading and installing PHP 5.X:

PHP can be downloaded (free) using the latest Web Platform Installer (WebPI) which happens to be WebPI version 5.0 from here:

http://www.microsoft.com/web/downloads/platform.aspx

The advantage of using the WebPI is that it not only it installs PHP engine but also configures it to work with IIS.

Downloading and installing is quite easy as shown in the following post:

http://hodentek.blogspot.com/2014/11/notes-and-screenshots-related-to.html

After installing PHP engine you should test to verify it is working correctly by browsing the info.php file shown next from the following file location:

C:\inetpub\wwwroot\info.php

Here is the simple code listing for info.php:

phpinfo();
?>
 
If your PHP engine is working well you should see the following (only part of a very long page is shown) when you browse this file in your IIS or type the following in the address box of your browser.
 
 
This completes the installation of PHP 5.6 on Windows 8.1 Professional that works well with IIS 8.0

In a future post we take a look at accessing SQL Server 2012 from a PHP application.

Related must read article:

http://hodentekmsss.blogspot.com/2010/05/phpbb-brings-interoperability-with-sql.html
 
I have covered in detail how to use PHP applications (PHP versions 5.2.4 or later) to access data on Microsoft Azure SQL Databases (formerly called  Microsoft SQL Azure) using PHP Data Objects. Details are on pages 369-373, Chapter 10 in my 2010 book here:

 
You can buy or join the library here:

 
 
 
 
 
 
 
 
 
 
 



 

Wednesday, November 19, 2014

What is DMCA?

DMCA stands for Digital Millennium Copyright Act (it is part of the US Copywrite law) and it criminalizes, "production and dissemination of technology, devices, or services intended to circumvent measures (commonly known as digital rights management or DRM) that control access to copyrighted works".

This United States copywrite law implements two 1996 treaties of World Intellectual Property Organization.

Follow Wikipedia for further details: http://en.wikipedia.org/wiki/Digital_Millennium_Copyright_Act.

According to this law you could be penalized and pay penalties for copywrite infringement on the Internet.

DMCA provides protection to online providers such as Google from copywrite infringement liability claims provided, Google and similar providers remove or disable the alleged infringing sites.
You can get more information here for DMCA related information for Google Products:
http://www.google.com/transparencyreport/removals/copyright/faq/

If you think you are the target of copywrite infringement (Let us say your blog or some picture) you could bring it to the notice of Google or the other provider so that they can take steps to remove.

How effective is this process?

Internet is big and the complexity grows each day and I am not really sure how much protection you can get. I have been the target and you can read about it here  and here.



 

Monday, November 10, 2014

What is the difference between Windows PowerShell and Windows PowerShell ISE?

Windows PowerShell is not a GUI application and it runs the PowerShell engine in the host program. You will see the following screen displayed when you access Windows PowerShell from the Search charm on Windows 8.1.


If you choose to launch you should search for 'Windows PowerShell ISE. The following screee will be displaced. It is rich interface that has many features including interactive help in scripting. If you are new to Power Shell you should begin your learning with this tool.


You can launch them as administrator which gives you more power (Run as Administrator) and is called launching with elevated permissions.

You can launch multiple instances.

You may be interested in these two posts as well:
http://hodentekmsss.blogspot.com/2014/11/a-quick-note-on-writing-powershell_12.html
http://hodentekmsss.blogspot.com/2014/11/a-quick-note-on-writing-powershell.html

Do you know that Here-Strings are?
Find it here:
http://hodentekhelp.blogspot.com/2015/06/what-is-here-string-in-windows.html

Monday, November 3, 2014

How do you work with Javascript Object Notation?

With enhancements to JavaScript in recent years and the advent of AJAX, interest in JavaScript took a turn for the better. Early on with AJAX it was recognized that there was a contender for XML for handling data which was stable, faster, and portable. This was the beginning of JSON.

Although RFC 4627 marks a JSON milestone, it appears that it had already been discussed among the JavaScript cognoscenti. JSON is equally, or even more suited, for data exchange than XML, which was originally considered to be the ideal wire friendly format.
What is JSON?
So what is JSON? It’s an acronym you might have started appearing in greater frequency on the Internet. JSON stands for JavaScript Object Notation. Well, it is a special object notational construct and is a subset of JavaScript. It can be used wherever JavaScript can be used and you do not need to download anything. There is no need to worry about the version of JavaScript.
You can read more about JSON in RFC 4627. JSON was designed to be minimal (small), textual, and portable. The MIME Media Type is now registered as application/json. JSON can handle exchanging data in applications written in different programming languages such as C, C#, ColdFusion, Perl, Python, Ruby, and so forth.

JSON Basics
JSON has simple types and two structures which are very similar to the universally used data structures such as dictionary objects, hash values, key/value pairs, lists, sequences, record sets, arrays and so on. It is a natural.

Types in JSON

JSON’s JavaScript subset admits of the following four primitive types.
* strings [except ", and Control Characters]
* number [Integer, real and Floating point]
* Boolean [literals, true and false]
* null

Unlike JavaScript it does not support hexadecimal and octal representation of numbers, nor does it support NaN (not a number) and infinity. Also numbers do not need quotes but strings do.
In addition to the four primitives it also supports two kinds of structures, object and array.

JSON Object
A JSON object is an unordered set (members) of key/value pairs, with keys being separated by values using a colon (:) and the members being separated by a comma (,). The colon and the comma are respectively called the name separator and the value separator.
Here is a variable that represents a JSON object with three members. “company”:”Hodentek” is one member of the JSON object where the key, which is “company,” is separated by the value, which is “Hodentek.” The object is always enclosed between curly brackets as shown in the declared variable. In this example all the values are of type string.

var jObj={"company":"Hodentek", "phone":"609-275-1205", "city":
"Plainsboro"};

You can access any member’s value using the dot notation as shown in the next snippet, which shows the “phone” of the object in the alert as “609-275-1205.”

alert(jObj.phone);//

The values of members of the JSON object can be of different types as shown in the following code listing.
 
Script Language="JavaScript"›

//values are numbers (integer and floating point)
var jobj2={"sunday":1, "tuesday":2.85, "wednesday":3};
document.write("‹b›jobj2.tuesday:‹/b› " + jobj2.tuesday +"‹br›");
//values are of mixed types
var jObj3={"culprit":true, "innocent":false, "notsure":null};
document.write("‹b›jObj3.culprit:‹/b› " + jObj3.culprit +"‹br›");
document.write("‹b›jObj3.innocent:‹/b› " + jObj3.innocent +"‹br›");
document.write("‹b›jObj3.notsure:‹/b› " + jObj3.notsure +"‹br›");

‹/script›

The displayed output when this code is browsed is as shown in the next picture.


JSON Array

Unlike JSON objects, JSON arrays are enclosed between square braces [ ]. The JSON array is an ordered sequence of values separated by a comma (,). The values can be any of the primitive types as well as the two structures, JSON objects and JSON arrays. Here is a JSON array variable with four string values.

var myJsonArray=["Red", "Blue", "Yellow", "Magenta"];

You will be able to access an array item from its position (0 based) as shown in the following listing.

‹SCRIPT LANGUAGE="JavaScript"›
var myJsonArray=["Red", "Blue", "Yellow", "Magenta"];
for (i=0; i‹4; i++){
document.write("‹b›myJsonArray["+i+"]‹/b›="+ myJsonArray[i]+"‹br›");
}
‹/SCRIPT›

The displayed output when this script is executed is as shown in the next picture.


It is possible to have an array  whose elements are of different types. Array items can be objects and arrays as well, as shown in the next listing.
‹SCRIPT LANGUAGE="JavaScript"›
//Array with different types
myJA2=["red", 1, null, true];
document.write("‹;b›myJA2:‹;/b›  " + myJA2[2]);
document.write("‹;p›‹;/p›");
//Nested array
myJA3=["red",1,["a", "b", "c"], false];
document.write("‹;b›myJA3[2][1]:‹;/b›  " + myJA3[2][1]);
document.write("‹;p›‹;/p›");
//Object in an array
myJA4=["red", {"Yes":"Yes, you do", "No":"No, you do not"}, 2];
document.write("‹;b›myJA4[1].Yes: ‹;/b›"+ myJA4[1].Yes);
‹;/SCRIPT›

The displayed output when this script is executed is as shown in the next picture.


Notice how the inner array and the object inside the array are  accessed.
JSON and XML
JSON is minimal textual representation of data as compared to the “verbose” XML, which makes equivalent XML much larger than JSON. Well, both are textual, but JSON is more so than XML with all its “angularities.” This is not to put down XML but just to highlight the obvious. This has obvious implications for AJAX, and more often JSON is the preferred data format in which AJAX results are received.
Everything in XML is a string but JSON has types as discussed earlier. JSON equivalent of XML In my previous tutorials, XML Islands and XML Responses and AJAX, the file webstudents.xml was used for illustration.

The same file will be represented as a JSON object in this section. The file is reproduced here for reference. In writing down the equivalence only the root element and its children are considered. Here is the listing of webstudents.xml.
‹wclass›
‹!--My students who took web programming class with me--›
‹student id="1"›
‹name›Linda Jones‹/name›
‹legacySkill› Access, VB5.0‹/legacySkill›
‹/student›
‹student id="2"›
‹name›Adam Davidson‹/name;
‹legacySkill›Cobol, MainFrame‹/legacySkill›
‹/student›
‹student id="3"›
‹name›;Charles Boyer‹/name›
‹legacySkill›HTML, Photoshop‹/legacySkill›
‹/student›
‹student id="4"›
‹name›Charles Mann‹/name›
‹legacySkill›Cobol, MainFrame‹;/legacySkill›
‹/student›
‹/wclass›

The rules in this conversion are simple. The root element will be the main object, and the three student nodes will form an array. Each array element will be a student object with its own attributes as a string value pair. If you keep the following syntax  in your cross-hairs it will be easy to follow the listing.

Object: var obj={key1:value1, key2:value2 ,key3:value3};
Array: var Arr=[valueA, valueB, valueC];

The XML document has both simple and complex types and this is developed piecewise to make the explanation easy to understand.

Root element with students and their attributes

The root element is the object with the three students arranged in an array. Each of the students is an object as shown in the next listing.

‹SCRIPT LANGUAGE="JavaScript"›
var justStudents={"wclass":[
{"student":{"id":"1"}},
{"student":{"id":"2"}},
{"student":{"id":"3"}}
]}
alert(justStudents.wclass[1].student.id);
‹/SCRIPT›
This is an object whose value is an array. The wclass[1] refers to the second student object and is accessed as shown in the alert statement. This code will display an alert window with value 2. In the above code the children of the students are not included.
Root element with student’s children

The next listing shows the JSON object with only the children of students shown in an array.

‹SCRIPT LANGUAGE="JavaScript"›
var webclass ={
"wclass":[
{"student":
{"name":"Linda Jones", "legacySkill":"Access, VB 5.0"}},
{"student":
{"name":"Adam Davidson", "legacySkill":"Cobol, MainFrame"}},
{"student":
{"name":"Charles Boyer", "legacySkill":"HTML, XML"}}
]
};
alert(webclass.wclass[1].student.legacySkill);
‹/SCRIPT›

Here student 2 is “Charles Boyer” and his legacyskill is displayed in the alert box. Combining the two, it is easy to see how the JSON equivalent of webstudents.xml can be fashioned as shown in the next listing.
‹SCRIPT LANGUAGE="JavaScript"›
var studentAll={"wclass":[
{"student":{"id":"1"},"name":"Linda Jones",

"legacySkill":"Access, VB 5.0"},
{"student":{"id":"2"},"name":"Adam Davidson",

"legacySkill":"Cobol, MainFrame"},
{"student":{"id":"3"},"name":"Charles Boyer",

"legacySkill":"HTML, XML"}
]};
document.write("‹b›Id of 3rd student: ‹/b›" + studentAll.wclass[2].

student.id);
document.write("‹br/›");
document.write("‹b›name of 2nd student:‹/b› " + studentAll.wclass[1].

name);
document.write("‹br/›");
document.write("‹b›legacySkill of 1st student:‹/b› " + studentAll.

wclass[0].legacySkill);
‹/SCRIPT›

The listing also shows how the various values are accessed. The displayed output when this script is executed is as shown in the next picture.


Notice how the student attributes are accessed.

What about binary object representation?

There is no native support for binary objects. However some new formats have appeared recently.
Read here and here. However their universal adoption will take time.

Summary

JavaScript Object Notation (RFC 4627) is introduced with examples of its types, objects and structures in this post. JSON is well suited for data interchange. JSON is stable because it has no versions; needs no validation; and is not extensible, all very likable characteristics which may make it a long time player in JavaScript.

However, since JSON is a subset of JavaScript, it has to conform to the same naming conventions regarding the use of language specific keywords and other rules. Also, its usefulness in AJAX calls is obvious because JSON is as easy for humans as it is for machines, and a lot simpler and more understandable. he fact that it is easy for machines makes it an obvious for the Internet of Things where communication with machines takes center stage.

In the simple example of webstudents.xml, the number of characters for XML amounted to 413, whereas when formatted in JSON it required 243, a substantial difference. Accessing values is also a lot simpler than going through the ECMA object model climbing up and down the XML tree.

Unmodified version of the post appeared here:
http://www.devarticles.com/c/a/JavaScript/JSON-Basics/2/

Friday, October 24, 2014

How to developer-unlock a Windows Phone 8.1 Preview and deploy an app?

You are a Windows Phone 8.1 Preview developer and you have created a nice app that you want to
test on a phone you own.

How do  you test it?

While developing the application using Visual Studio 2013 Express for Windows Update 3 (this is a
free developer resource, read more here) you will see it on a emulator, the phone image that emulates your actual phone  that comes on your PC/Laptop when you run the app. After running the app on your laptop you should deploy it to your phone. The phone you buy is by default locked and you need to unlock it.

Details of unlocking the phone are here:
Go to this link:
http://go.microsoft.com/fwlink?LinkID=317976

This is how I was able to do.
  • I connected my phone (Nokia Icon) to the laptop.
  • On my Windows 8.1 Professional (x64 bit) laptop I searched for Windows Phone and got these results(few shown)


  • I clicked on the Windows Phone Developer Registration. I do have a developer license attached to my Windows LiveID (you shold have one too).

The following screen opened up. Notice the last line in this screen referring to the status. The phone I am using is identified.


I clicked on Register

The phone gets registered and the status shows it is unlocked now.


I can now deploy the app to the device. If deployment is successful I will be able to see the app on my app list in the phone.

I have to take care of the following before I deploy.
Make sure the phone is connected to the PC/laptop on which you developed the application.
Build the app for ARM architecture (you should find it immediately below the menu item Store on your Visual Studio 2013 IDE, see next image) and make sure the phone is working and is not locked.

 

Thursday, October 23, 2014

How do I take a screenshot of a display on my Windows Phone 8.1?

This is easy but a little tricky but you do get a signal when you capture an image.
I am using Nokia Icon using Windows Phone 8.1 Preview.

Also you may not have a folder called Screenshots in your Photo where it is supposed to get saved. But as soon as you add your first screen shot, a folder Screenshots will be created where your first screen shot is stored. You do not need an app to do this.

How do you capture?

With the display showing your image, hold and press both Volume Up(hardware) and Start (hardware) buttons together. This is the tricky part because the Start (hardware start) button when pressed turns your display dark and I could do it only 30% of the times. But it does work.

Here is a screenshot I took today:
http://hodentekmobile.blogspot.com/2014/10/how-do-i-get-health-and-wellness-app-to.html

 

Wednesday, October 22, 2014

What is LumiaSensorCore?

Microsoft introduced Lumia SensorCoreSDK at Build 2014. It enables memory-efficent tracking of motion and location information. It is ideally suited to building health and fitness tracking activities using the 4 apis.

It is supported on several of Nokia phones using Windows Phone 8.1 OS. The early beta is now an offial release SDK version 1.0 since Octobe 14.

If you are a developer you should access this site to learn more:
http://developer.nokia.com/lumia/nokia-apis/sensorcore
It is already built into Bing app for Health and Fitness app from Windows Store.
http://www.bing.com/explore/binghealthfitness

 

Friday, October 17, 2014

What is DISM (Deployment Image Servicing and Management)?

DISM is short for Deployment Image Servicing and Management. It can be used in new deployments as well as repairing the local image (the OS on the laptop or desktop). It is a very useful tool to know.

It works on many Windows platforms:
  • Windows 8
  • Windows 81
  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows 7
  • Windows Server 2008 R2
Also review this link for Windows 7 related information:
 


Good news is it is installed with Windows 8.1 and is found here typically:
C:\windows\System32

If you search for it you may find it in several folders.
These are listed in my Windows 8.1 Professional (x64).











How do you use it?
It is a command line tool and you need to bring up command processor with administrative privileges
(Run As Administrator) also know as elevated mode. If you are unable to run cmd.exe in elevated mode like it happenned to me follow this link for the procedure to run in elevated mode.
http://hodentekhelp.blogspot.com/2014/10/how-to-run-command-processor-in.html
Now type dism /? after the C:\ prompt. You get the help file as shown and you get to display the file
details and its usage.
--------------------
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>dism /?
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031


DISM.exe [dism_options] {Imaging_command} []
DISM.exe {/Image: | /Online} [dism_options]
         {servicing_command} []

DESCRIPTION:
  DISM enumerates, installs, uninstalls, configures, and updates features
  and packages in Windows images. The commands that are available depend
  on the image being serviced and whether the image is offline or running.

GENERIC IMAGING COMMANDS:
  /Get-MountedImageInfo   - Displays information about mounted WIM and VHD
                            images.
  /Get-ImageInfo          - Displays information about images in a WIM or VHD
                            file.
  /Commit-Image           - Saves changes to a mounted WIM or VHD image.
  /Unmount-Image          - Unmounts a mounted WIM or VHD image.
  /Mount-Image            - Mounts an image from a WIM or VHD file.
  /Remount-Image          - Recovers an orphaned image mount directory.
  /Cleanup-Mountpoints    - Deletes resources associated with corrupted
                            mounted images.
WIM COMMANDS:

  /Capture-CustomImage    - Captures customizations into a delta WIM file on a
                            WIMBoot system. Captured directories include all
                            subfolders and data.
  /Get-WIMBootEntry       - Displays WIMBoot configuration entries for the speci
fied disk volume.
  /Update-WIMBootEntry    - Updates WIMBoot configuration entry for the specifie
d disk volume.
  /List-Image             - Displays a list of the files and folders in a
                            specified image.
  /Delete-Image           - Deletes the specified volume image from a WIM file
                            that has multiple volume images.
  /Split-Image            - Splits an existing .wim file into multiple
                            read-only split WIM (SWM) files.
  /Export-Image           - Exports a copy of the specified image to another
                            file.
  /Append-Image           - Adds another image to a WIM file.
  /Capture-Image          - Captures an image of a drive into a new WIM file.
                            Captured directories include all subfolders and
                            data.
  /Apply-Image            - Applies an image.
  /Get-MountedWimInfo     - Displays information about mounted WIM images.
  /Get-WimInfo            - Displays information about images in a WIM file.
  /Commit-Wim             - Saves changes to a mounted WIM image.
  /Unmount-Wim            - Unmounts a mounted WIM image.
  /Mount-Wim              - Mounts an image from a WIM file.
  /Remount-Wim            - Recovers an orphaned WIM mount directory.
  /Cleanup-Wim            - Deletes resources associated with mounted WIM
                            images that are corrupted.

IMAGE SPECIFICATIONS:
  /Online                 - Targets the running operating system.
  /Image                  - Specifies the path to the root directory of an
                            offline Windows image.

DISM OPTIONS:
  /English                - Displays command line output in English.
  /Format                 - Specifies the report output format.
  /WinDir                 - Specifies the path to the Windows directory.
  /SysDriveDir            - Specifies the path to the system-loader file named
                            BootMgr.
  /LogPath                - Specifies the logfile path.
  /LogLevel               - Specifies the output level shown in the log (1-4).
  /NoRestart              - Suppresses automatic reboots and reboot prompts.
  /Quiet                  - Suppresses all output except for error messages.
  /ScratchDir             - Specifies the path to a scratch directory.

For more information about these DISM options and their arguments, specify an
option immediately before /?.

  Examples:
    DISM.exe /Mount-Wim /?
    DISM.exe /ScratchDir /?
    DISM.exe /Image:C:\test\offline /?
    DISM.exe /Online /?
C:\Windows\system32>

-------------
You can get more information as shown in the examples above.

If some of your files are corrupted and causing problems you can use this tool to see which of them are corrupted and also heal them using uncorrupted versions.



 

How to run command processor in elevated mode?


Normally it should be very easy. Search for cmd in the search charm. In the drop-down menu right click 'Command Prompt' and from the drop-down menu click 'Run as administrator'.

If that does not start cmd.exe in elevated mode you may follow the next procedure. Due to some bugs the elevated mode does not start this way.
Click Cntrl+Alt+Del to bring up the Task Manager screen as shown:










Click File | Run new Task (by default the cmd is chosen)
The Create new task window is displayed with cmd as the task as shown.


Place check mark for 'Create this task with administrtive privileges'
The command processor in the elevated mode is displayed. Now you can carry out all thingss that need elevated mode.

Wednesday, October 15, 2014

How do you create a compressed file in Windows 8.1?

Normally (as in Windows 7 or Windows XP) it should be real easy requring just a right click on the file you want to save as a compressed file.

It is (sometimes) not that easy in Windows 8.1. The reason being the right click produces a dud if there is something wrong. Did I say a bug? or corrupted file? Nothing happens, as in my case. The CMD.exe cannot be run in adminstrative mode since the same thing happens as a with a right click.

What do you do now?

As any sane person would do, trash your laptop/desktop/tablet/phone/xxx or Microsoft. I am kidding.

The solution I found is the following:
You need to read the next two posts to prepare yourself:
http://hodentekhelp.blogspot.com/2014/10/how-do-you-open-file-explorer-in.html
http://hodentekhelp.blogspot.com/2014/10/how-do-you-access-folderfile-properties.html

Having read the above open you folder which contains the file or folder you want to compress as shown:
Now you can see you can create a zip file. Click on New Item to create a zip file.


 

Tuesday, October 14, 2014

How do you open File Explorer in Windows 8.1?

In Windows 8.1 (Professional in this case but should be the same in other versions) what used to be Start in Windows 7 has been replaced by the Windows logo which takes you to the Metro mode of Windows 8.1.

If you right click the logo you bring up a pop-up menu as shown.



If you click the File Explorer (no matter click, right click or left click), nothing happens, the desktop display is refreshed.

How do you open the File Explorer?

Open the Search charm and type in File Explorer. The File Explorer appears in the Search as shown.


Right click the File Explorer click Pin to Taskbar in the pop-menu shown here.


Now a folder icon is added to the Taskbar as shown.


Now right click the folder icon (File Explorer) to display the pop-up menu from which you can access the folders.

A related question is in the following link:
http://hodentekhelp.blogspot.com/2014/10/how-do-you-access-folderfile-properties.html


 

What is SQL Server PowerShell provider and how do you use it?

SQL Server PowerShell provider enables you easily and interactively look at all objects much like you look at all the objects in a folder/file system.  You can use the command line to traverse paths in a SQL Server.

The server objects available as folders when you use Windows Power Shell are:
SQL
SQL Policy
SQL Registration
Utility
DAC
Data Collection
SQL Server Integration Services
SQL Server Analysis Services


In order to acces objects on SQL Server you need to run SQLPS.exe which you find in the following directory:
---------------------------------------------
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules>dir
 Volume in drive C is TI10672700E
 Volume Serial Number is 16FB-D230

 Directory of C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\M
odules

 
07/06/2014  06:33 PM              .
07/06/2014  06:33 PM              ..
07/06/2014  06:37 PM              SQLASCMDLETS
07/06/2014  06:40 PM              SQLPS
               0 File(s)              0 bytes
               4 Dir(s)  880,764,026,880 bytes free

----------------------
When you run SQLPS by double-clicking the file you spawn a new scripting shell 

------------
Microsoft SQL Server PowerShell
Version 11.0.2100.60
Microsoft Corp. All rights reserved.

which you can use with SQL Server as shown:
PS SQLSERVER:\>
--------------
In this shell you can access the previously mentioned SQL Objects much like you would acces folders/files using you DOS commands as shown here.
---------------
PS SQLSERVER:\> cd SQL
PS SQLSERVER:\SQL> cd..
PS SQLSERVER:\> cd SQLPolicy
PS SQLSERVER:\SQLPolicy> cd..
PS SQLSERVER:\> cd SQLRegistration
PS SQLSERVER:\SQLRegistration> cd..
PS SQLSERVER:\> cd Utility


How do we access the Server databases?
In order to do this you have to know the SQL Server Instance(s) and then the objects can be accessed as shown here:
-------
Get the instance name:
--------------------------
PS SQLSERVER:\> cd SQL
PS SQLSERVER:\SQL> dir

MachineName
-----------
HODENTEK8
localhost


PS SQLSERVER:\SQL> cd LocalHost
PS SQLSERVER:\SQL\LocalHost> dir
Instance Name
-------------
REGENCYPARK
------------------------------
Let us say we want all the objects on the AdventureWorks 2012 database on this instance.
You can find them as shown here:
--------------
PS SQLSERVER:\SQL\LocalHost\RegencyPark\Databases\AdventureWorks2012>
ApplicationRoles
Assemblies
AsymmetricKeys
Certificates
DatabaseAuditSpecifications
Defaults
ExtendedProperties
ExtendedStoredProcedures
Federations
FileGroups
FullTextCatalogs
FullTextStopLists
LogFiles
PartitionFunctions
PartitionSchemes
PlanGuides
Roles
Rules
Schemas
SearchPropertyLists
Sequences
ServiceBroker
StoredProcedures
SymmetricKeys
Synonyms
Tables
Triggers
UserDefinedAggregates
UserDefinedDataTypes
UserDefinedFunctions
UserDefinedTableTypes
UserDefinedTypes
Users
Views
XmlSchemaCollections

That's all for now.

Mahalo

Accessing PowerShell in SSMS go here:
http://hodentekmsss.blogspot.com/2014/04/starting-power-shell-from-sql-server.html

How do you access folder / file properties in Windows 8.1?

In earlier versions of Windows you would right click a file or a folder to access the properties via the drop-down menu.

But in Windows 8.1 (in my case Windows 8.1 Professional 64bit), a right click would just refresh the Windows Desktop and nothing happens). I believe this is not how it should be and here is a way to look at the folder / file properties.

In Windows 8.1 open the File Explorer as shown.


Click open the folder for which you want to review the properties. In this case Desktop for example.
The Window for Desktop opens with its own ribbon as shown.


Choose the folder or file (mysorian in this case) and access its properties via the Properties toolbar item.

It was so easy in earlier versions. I wish the earlier way of access is restored.


 

Tuesday, September 23, 2014

Does iPad Air support multi-user logins?

Having mulit-users for a tablet/iPad type devices is a good feature to have. Of course you can sell more iPads if only one user is targetted, but is it prudent? Not if you want your minor to have his own. It is best if he/she can share with an adult who can oversee if some mischief is going to take place.

Also there is the question of economics? single earner families with more than one child for example.

iPad Air does not allow you to share the iPad with another user. Another user can use but the identity will be that of yours. This has caused some embarassments in sending out wrong information when the iPad was used by two with the profile of a single user.

Only Android and Windows OS has the capability of mainatining multiple users and their profiles. Galaxy Note Pro 12.2 (using Android OS); Nokia and Toshiba tablets that use Windows OS support multiple users.

There are some apps for iPad that can create multiple users. But this is only for certain mail applications etc. It cannot be truly called Multiple-user support.

Also read here:
http://www.product-reviews.net/2014/04/11/galaxy-note-pro-12-2-vs-ipad-air-for-multi-login/
More scenarios for multi-users from here, http://www.citeworld.com/article/2114769/tablets/tablets-supporting-
multiple-users-have-edge-ipad-home-not-work-or-school.html
:
"When you're talking about a tablet, that strict single-user assumption breaks down (Apple's unspoken message appears to be that everyone should have their own iOS device). Many families share one (or more) tablet(s) among some, if not all, family members. In education settings, multiple students may share a tablet during a single class or the same tablets may be used by different students in each class session. In business, teams may share a pool of tablets
that each user can check one out as needed for meetings or presentations - a technique that can be used in a wide range of professions such as as sales, marketing, healthcare, teaching or training, law enforcement and field support. Even when tablets aren't explicitly shared, students or workers may need to let someone else use a tablet to add content, review work or browse information."

How do you lock a TSA approved suitcase-lock on Delsey Helium Shadow 2?

I recently bought a Delsey Helium Shadow 2 suitcase which came with a E-181 lock which can
be set by a user but can be opened by Transportation Security Administration staff without
damaging the  lock or the suitcase.

I add another picture to Delsey's own documentation as it does not tell you any details about part B
on its instruction sheet in the next picture. I had to call them at 1-877-333-0126 to find out the details.


The Parts B shown in the above  are the two zipper ends (shown below) that you should align just below the lock as shown in the next image. Lift the tags and push in slots in the lock.


 

Sunday, September 21, 2014

How to join a Windows tablet to the HomeGroup?

I recently bought a Toshiba Encore 2 WT10 A tablet (OS: Windows 8.1) by trading in my iPad which had several problems one of which was the network connection was falling off too often and emails
remained unread till my next stop at Apple Store.

Toshiba's tablet is quite nice, the cameras are not that great but lots of peripherals like external memory, USB etc.. Anyway, I have Nokia Icon which takes superb pictures and I have whole suit of Nokia Camera related apps that fixes up most photos I take.

Joining the HomeGroup

I wanted the tablet to join the HomeGroup which was already present on my Toshiba Satelite 570 Series laptop with its own default password. I think each device comes with it own default HomeGroup password which you can 'leave' to 'join' another.

All I needed to do was to start tapping Settings -> Change PC Settings -> Network -> and HomeGroup in that order. Then the HomeGroup details gets displayed as shown.



You should click the 'Leave' button on the tablet and copy and paste the password from the Homegroup on your laptop (or PC) in its place and click 'Join' on your tablet.

Now the tablet has joined the laptop's HomeGroup. You can also enable other options as to what can be shared on this HomeGroup page. However, you have to select one at a time since it takes a while for the share to be enabled.

Wednesday, August 27, 2014

If you have multiple versions of Power Shell how do you change from one to the other?

If you have two or more versions of Power Shell on your computer it is possible to choose the one you want to run.

By default the highest version may be one that runs as in the present case on Windows 8.1 Professional (version 4.0 is installed in Windows 8.1 by default and Version 3.0 in Windows 8).
As described in the previous post, version 2.0 is also present.

You can run the version you want by the following command:
PS C:\>Powershell -version

This is how you run the version you want.
---------------
Windows PowerShell
Copyright (C) 2013 Microsoft Corporation. All rights reserved.
The next command displays the version number
PS C:\Users\Jayaram> $PSVersionTable.PSVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1

The following changes the version to 2.0. Note that there is no response.
PS C:\Users\Jayaram> PowerShell -version 2.0
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

The following displays the version after change
PS C:\Users\Jayaram> $PSVersionTable.PSVersion
Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      -1     -1

PS C:\Users\Jayaram>

How do you install NuGet Package Manager?

NuGet is the package manager for Microsoft development platform including Microsoft .NET. NuGet gallery at nuget.org is the central package repository.

NuGet Package Manager is available for the following clients:
  • For Visual Studio 2010, 2012 and 2013 through Visual Studio Extension Gallery that you can access from Tools|Extensions and Upgrades... in Visual Studio IDE.
  • For WebMatrix 3 in the WebMatrix Extension
  • Command-line: http://nuget.org/nuget.exe
This is how you access in Visual Studio 2013 Express for Windows.



How do you manage packages? Read here for details:
http://msdn.microsoft.com/en-us/magazine/hh547106.aspx

How do you install Json.Net from NuGet Packet Manager?
Read here:
http://hodentekhelp.blogspot.com/2015/07/how-do-you-install-jsonnet.html

Sunday, August 24, 2014

What is SQLDiag?

SQLDIAG is an utility that provide general purpose diagnostics (collection).
It can be run as console application or as a service. It is available
in all versions starting from SQL Server 2005 to SQL Server 2014.
SQLDIAG collects the following types of information:

•Windows Event Logs (Application, System, and Security) in .CSV files

•System Monitor (aka Perfmon) performance counters in .BLG file/s

•SQL Server Profiler traces in .TRC file/s

•SQL Server Blocking chains in a _BLK.TRC file

•SQL Server error logs, configuration, point-in-time snapshots of several DMVs in
a .OUT file

•System information via the Msinfo32 utility in a .TXT file

You can customize the utility by editing (manually)  the XML configuration file
of the utility, SQLDiag.xml

There is also a GUI tool which you can use to visually edit the xml file at the
codeplex site here.
http://sdct.codeplex.com/

File location on your computer:
If you have installed SQL Server in the present post SQL Server 2012 it should be
installed in the same directory as SQL Server which is usually,
%ProgramFiles%\Microsoft SQL Server\110\Tools\Binn