Thursday, August 31, 2017

Where is the link to TypeScript 2.5?


TypeScript 2.5 (the latest) is now available for download here:

http://www.typescriptlang.org/#download-links



TypeScript2.5_0

If you have installed npm, installing TypeScript is a breeze.

> npm install -g typescript

Read here for installing npm:

http://hodentekhelp.blogspot.com/2017/08/what-is-npm-and-how-is-it-useful.html

Can I access my local web server(IIS)from my smart phone?

As long as the local web server (IIS) is working and you can browse a file on the server from your browser you should be able to browse the same file on your smart phone provided you access the IP Address of your computer hosting the IIS.
You can find the iPv4 address of your computer by using the ipconfig command :
------
C:\Users\Owner>ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
Wireless LAN adapter Local Area Connection* 1:
....
....
....
Wireless LAN adapter Wi-Fi:

   IPv4 Address. . . . . . . . . . . : 192.168.0.10
-------------------
Here is a partial view of my default site showing the content SVGCode.html, an interactive HTML5 page:


This is how it appears on a Microsoft Edge 15 browser:

This how it is called on my Microsoft Lumia 950 phone using the IP Address:
Note:  Although I entered the IP Address, the phone translated it to the computer name.

If it does not get displayed check the firewall and make sure this item is checked:

The computer was a Dell Laptop running Windows 10 Professional and the smart phone was a Microsoft Lumia 950 both on the same Wi-Fi network.

Tuesday, August 29, 2017

Does your browser support localStorage?

If your browser supports HTML5 then your browser supports local storage. The image below is for Microsoft Edge 15.


You can also view this HTML file (TodaysDate.html) below on your local IIS.



<html>
<body>

<div id="result"></div>

<script>
// Check browser support
if (typeof(Storage) !== "undefined") {
    // Store
    localStorage.setItem("Today", Date());
    // Retrieve
    document.getElementById("result").innerHTML = localStorage.getItem("Today");
} else {
    document.getElementById("result").innerHTML = "No browser support for localStorage";
}
</script>

</body>
</html>

If localStorage is supported then you should see the following (for today).

This also worked on IE 11 as well as Mozilla Firefox.




Sunday, August 27, 2017

How do you install Cordova Command-line Interface on a Windows 10 laptop?

You can use the Cordova command-line interface (CLI) to deploy JavaScript / HTML Cordova application to various native platforms.

Cordova CLI is distributed as an npm package and you need Node.js. You may download Node.JS from here:
https://nodejs.org/en/download/



NodeJs_08

Installing Node.JS installs npm. npm is the package manager for JavaScript and the world’s largest software registry. Read more about npm here:


http://hodentekhelp.blogspot.com/2017/08/what-is-npm-and-how-is-it-useful.html


I already had a slightly earlier version of Node.JS and I take off from there.

All I need to do now is to invoke npm to install cordova.

I do so by running this command:

---
C:\Windows\system32>npm install -g cordova
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
C:\Users\Owner\AppData\Roaming\npm\cordova -> C:\Users\Owner\AppData\Roaming\npm\node_modules\cordova\bin\cordova
C:\Users\Owner\AppData\Roaming\npm
`-- cordova@7.0.1
  +-- configstore@2.1.0
  | +-- dot-prop@3.0.0
  | | `-- is-obj@1.0.1
  | +-- graceful-fs@4.1.11
  | +-- mkdirp@0.5.1
  | | `-- minimist@0.0.8
  | +-- object-assign@4.1.1
  | +-- os-tmpdir@1.0.2
  | +-- osenv@0.1.4
  | | `-- os-homedir@1.0.2
  | +-- uuid@2.0.3
  | +-- write-file-atomic@1.3.4
.
.
.
.
 After a while it gets installed.

Testing  installed version of cordova

C:\Windows\system32>cordova --version
? May Cordova anonymously report usage statistics to improve the tool over time? Yes
Thanks for opting into telemetry to help us improve cordova.
7.0.1
C:\Windows\system32>

Now you have access to Cordova version 7.0.1 on your computer

Thursday, August 24, 2017

What is npm and how is it useful?

npm is the package manager for JavaScript and the world’s largest software registry. npm is distributed with Node.js- which means that when you download Node.js, you automatically get npm installed on your computer.

Test if you have installed Node.JS and npm. There are lots of versions of Node.JS and npm and be aware of the versions and their compatibility.


NodeNmpInstalled.png

npm registry has the largest(millions) number of packages of free, reusable code.
Depending on your needs you may choose one of these account types for using npm.


Node_NpmAccTypes

It provides an huge registry with many different programs like jQuery, AngularJS etc.

For exmple, if you are installing Cordova pacakge you can do so from command-line like in here;

 C:\>npm install -g cordova

The -g switch means globally, otherwise it will be installed in the node_modules subdirectory.

Here is how you run the help file for npm:


Node_npmHelp

npm master reference here:
https://www.npmjs.com/

Tuesday, August 22, 2017

How do you send mail using SQL Mail from SQL Server 2012 Express?

Database Mail in SQL Server Express 2012 does not have Database Mail feature built-into SQL Server Management as it does in Enterprise | Standard editions. Database Mail is also found in the Developers edition as seen in the next image.



However you can send Database mail using either CLR Integration or configure SQL Mail using the System Database, msdb