# Friday, 31 August 2018

FoundationThe Galactic Empire has existed for thousands of years and seems to be powerful with a bright future. But not to psychohistorian Hari Seldon.

Using advanced mathematics and his newly-created science of "psychohistory", Seldon predicts that the Empire will soon collapse and be followed by a dark period lasting 30,000 years, until a new Empire will finally rise again to restore technology and culture to the galaxy. The collapse is inevitable, but Seldon has a plan to reduce the dark period to 1,000 years. That plan involves the Foundation - a colony of scientists placed on a remote planet at the edge of the galaxy and a set of crises that must be overcome over the next centuries.

This is the universe of Foundation by Isaac Asimov.

Long after Seldon's death, he continues to influence the society he founded. He periodically appears in a recorded holovision to announce the arrival and resolution of a "crisis" - crises that he predicted would occur and for which he accurately predicted the resolution.

Foundation is told in a collection of short stories, set many thousands of years in the future. Each story takes place a few decades after the one before it, so we have little time to get to know the characters - only how they influence their society. The characters are less interesting than Seldon's master plan and his application of psychohistory to each crisis. The forces that motivate society, such as politics, military force, religion, and commerce take center stage in these stories. Seldon knew he could not predict the behaviors of individuals not yet born, so he combined sociology, mathematics, and statistics to look at the behaviors of populations in aggregate and predict what how entire societies would react to the forces around them. Of course, this idea is applied today - both in the real world and in speculative fiction.

Three quarters of a century after its publication, Foundation remains a strong novel. It was published as part of a trilogy in the early 1950s, and Asimov later released many sequels and prequels. Eventually, he tied together these stories with his popular Robot novels, setting the Foundation, Empire, and Robot series all in the same universe.

Science fiction has been heavily influenced by Asimov and his Foundation series. Other writers have written about mankind's colonization of space and a galactic empire. Certainly, George Lucas was aware of this series when he created the Star Wars universe. And in 1966, the prestigious Hugo Award declared the Foundation trilogy to be the Best All-Time Science Fiction Series.

And it all began in the 1940s, when a 22-year-old Asimov published a short story that would later be compiled into a book that would be volume 1 of a trilogy that would launch a universe that would influence the world.

Friday, 31 August 2018 12:48:14 (GMT Daylight Time, UTC+01:00)
# Thursday, 30 August 2018

GCast 11:

Azure Media Services - Uploading, Encoding, and Sharing a Video

Learn how to Upload, Encode, and Share a Video using Azure Media Services.

Azure | GCast | Screencast | Video
Thursday, 30 August 2018 09:29:00 (GMT Daylight Time, UTC+01:00)
# Wednesday, 29 August 2018

Azure Storage allows several options for managing replication of your stored data. You can read about these options in this article.

You can set the Replication Type when you create an Azure storage account (Fig. 1)

Fig01-CreateStorageAccount
Fig. 1

But, at first glance, it appears that you cannot change the Replication Type after you create the account. The "Overview" blade (Fig. 2) lists the Replication Type, but you cannot change it here.

Fig02-OverviewBlade
Fig. 2

However, the "Configuration" blade (Fig. 3) also lists the Replication Type.

Fig03-ConfigurationBlade
Fig. 3

On this blade, you can click the "Replication" dropdown (Fig. 4) and change the type.

Fig04-ReplicationDropdown
Fig. 4

Click the [Save] button (Fig. 5) to make these changes permanent.

Fig05-SaveButton
Fig. 5

Wednesday, 29 August 2018 16:05:20 (GMT Daylight Time, UTC+01:00)
# Tuesday, 28 August 2018

A caption file can enhance a video file by displaying any dialog as text at the bottom of the video. This is helpful for people who are hard of hearing, for people who do not understand the language spoken in the video and for those who want to play a video at low volume or muted.

Azure Media Services allows you to quickly create a caption file for your saved videos. The steps are:

  1. Create Azure Media Service
  2. Upload File
  3. Encode Asset
  4. Analyze Video
  5. Download VTT file
  6. Upload VTT file
  7. Share video

I described in detail how to perform steps 1-3 in this article.

Analyze Video

After you have encoded your video, you can use the "Analyze" function to generate the following files:

  • A caption file in the TTML format.
  • A caption file in the SAMI format
  • A caption file in the WebVTT format

I have no statistics to back this up, but I see WebVTT used more than the other 2, so I typically stick with this.

To run the "Analyze" function, open your Azure Media Service in the Azure Portal and open the "Assets" tag as shown in Fig. 1.

Fig01-AssetsBlade
Fig. 1

Click the Asset corresponding to the asset corresponding to the encoded video to open its blade, as shown in Fig. 2.

Fig02-EncodedVideoAssetBlade
Fig. 2

Click the [Analyze] button (Fig. 3) to open the "Media Analytics" blade, as shown in Fig. 4.

Fig03-AnalyzeButton
Fig. 3

Fig04-MediaAnalyticsBlade
Fig. 4

Check the checkboxes next to the Closed Caption file formats (and other files) you wish to crate; then click the [Create] button at the bottom to begin creating these files.

This creates and schedules a new job for this Azure Media Service. You can click the "Media Analytics job added" link (Fig. 5) at the top of the blade or you can open the "Jobs" blade for this Media Service and click the most recent job added. Either method will display the blade for this Job, as shown in Fig. 6.

Fig05-JobAdded
Fig. 5

Fig06-JobBlade
Fig. 6

Jobs run asynchronously in Azure Media Service, so you can continue to work or stay on the Job blade to monitor its status. The status changes from "Scheduled" to "Queued" to "Processing" to "Finished". While processing, the blade will display the percent complete.

When the job is finished, you will see a new asset in the "Assets" blade for the indexed video, as shown in Fig. 7.

Fig07-Assets
Fig. 7

Click this asset to open the blade for the Analytics files created by this job, as shown in Fig. 8.

Fig08-IndexedFileAsset
Fig. 8

To make these files available for download, you must publish them. To do so, click the [Publish] button (Fig. 9), which opens the "Publish the asset" blade, as shown in Fig. 10.

Fig09-PublishButton
Fig. 9

Fig10-PublishTheAssetBlade
Fig. 10

After you have published these files, you can download any or all of them. They are listed at the bottom of the Analytics files blade (Fig. 8)

Click the file with the ".vtt" extension to open a blade for this file, as shown in Fig. 11.

Fig11-VTTFileBlade
Fig. 11

The important information is the DOWNLOAD URL field. You can copy this value to your clipboard by clicking the icon to the right of this field.

### Download VTT file

Use CURL to download this file. If CURL is not installed on your computer, you can install it from https://curl.haxx.se/download.html.

Open a command prompt and type

curl -o "fffff.vtt" "http://xxxxxxxxxxxxxxx"

where http://xxxxxxxxxxxxxxx is the DOWNLOAD URL copied from the blade; and fffff.vtt is the name of the local file you want to create when you download this file.

Verify that a new file was created.

Upload VTT file

Now upload this VTT file to the video asset. Open the Azure Media Services "Assets" blade and select the Asset for the originally uploaded video to open the blade for this video asset, as shown in Fig. 12.

Fig12-AssetBlade
Fig. 12

Click the [Upload captions] button (Fig. 13) to open the "Upload caption file" blade, as shown in Fig. 14.

Fig13-UploadCaptionsButton
Fig. 13

Fig14-UploadCaptionFileBlade
Fig. 14

Click the [Select File] icon (Fig. 15) and select the VTT file you downloaded with CURL.

Fig15-SelectFileIcon
Fig. 15

Share video

Now, you can share the video, using a Media Player.

A simple one to use is the Azure Media Player, available at https://ampdemo.azureedge.net/

Information on using this player with Azure Media Services is in this article.  http://davidgiard.com/2018/08/21/UploadingEncodingAndSharingAVideoWithAzureMediaServices.aspx.

You will need the URL of the video to play, which you can by selecting the Encoded Videos asset from the "Assets" blade to open the properties for this asset, as shown in Fig. 16.

Fig16-EncodedVideosAsset
Fig. 16

Copy the Streaming URL at the bottom of this blade under the "Published URLs" section. (NOTE: If nothing is in this section, you need to publish this asset.)

In Azure Media Player, copy this URL into the URL field, omitting the "http:", as shown in Fig. 17.

Fig17-AzureMediaPlayer
Fig. 17

The copied text should look something like this:

//dgtest2-usea.streaming.media.azure.net/d7d7eb93-9ef8-40fd-9c01-8253c9ca2126/Gratitude.ism/manifest

It will end with the name of your video asset, followed by ".ism/manifest".

Click the [Update Player] button and verify that your video plays properly.

If it plays properly, check the "Advanced Options" checkbox to display more options and scroll to the bottom, as shown in Fig. 18.

Fig18-AdvancedOptions
Fig. 18

Click the [Add Track] button to display new track information, as shown in Fig. 19.

Fig19-AddTrack
Fig. 19

At the "Kind" dropdown, select "Captions"

At the "Track Label" field, enter "English" or the name of the language in which the video is recorded. This text will display in the "Closed Captioning" control.

At the "Language" dropdown, select "English" or the language in which the video is recorded.

At the WebVTT URL, enter the URL of the uploaded VTT file. This will be identical to the video URL. The name of the VTT file will replace the name of the video asset, followed by ".ism/manifest".

It should look similar to this:

//dgtest2-usea.streaming.media.azure.net/d7d7eb93-9ef8-40fd-9c01-8253c9ca2126/Gratitude.vtt

Fig. 20 shows these fields completed for my video.

Fig20-VTTTrack
Fig. 20

Click the [Update Player] button.

Now, when you play the video, you should see a "CLOSED CAPTIONING" icon at the bottom right. Click this to reveal the CLOSED CAPTIONING setting and select the caption language you just added (English in the case of the video in Fig. 21)

Fig21-ClosedCaptioning
Fig. 21

With the captions enabled, you should see text below your video whenever anyone is speaking, as shown in Fig. 22.

Fig22-VideoWithCaptions
Fig. 22

In this article, I showed you how to create closed captioning and share a video that includes this captioning.

Azure | Video
Tuesday, 28 August 2018 09:38:00 (GMT Daylight Time, UTC+01:00)
# Monday, 27 August 2018
# Sunday, 26 August 2018

SIASLI do not hold Stranger in a Strange Land by Robert A. Heinlein as the science fiction classic that some readers rate it. But I give it an extra star for the introduction of the word "grok" - a word meaning many things, but mostly : "to understand something so well as to internalize its meaning". "Grok" has been adopted by geek culture - a culture in which I spend a great deal of time these days - to indicate comprehension of a complex technical topic.

Vernon Michael Smith ("Michael") was stranded on Mars as an infant when his spaceship crashed, killing all other crew and passengers. He was raised by Martians until he returned to Earth decades letter on the next manned ship to and from Mars.

The governments of Earth view Michael as an oddity -  a noble savage with an intelligent mind, who lacks the advantages of civilization. But Michael is civilized according to Martian culture. And he possesses great powers taught him by the Martians, including the ability to direct his consciousness to leave his body and the ability to make objects and people move or disappear with just a thought.

The government tries to keep Michael a prisoner; but he escapes with the aid of Jill - a nurse in the hospital where he is confined - and Jubal - a retired author living in seclusion. While on the run from the government, Michael joins a circus and then a church, where he rises to a position of leadership. The church preaches the pursuit of joy and free love, which pisses off many other Americans.

As time passes, Michael becomes more like his fellow Earthmen. But he also influences them to adopt many of his Martian ways.

Michael's parallel to the life of Jesus is unmistakable. He is first exposed to the public in his adulthood and he quickly enters the public consciousness, impressing people with his powers, before taking over and influencing a small religion - an action for which he is hunted down and persecuted.

There are some troubling bits of sexism in this book: "Nine times out of ten, if a girl gets raped, it’s at least partly her own fault", according to Jill, the main female character of the novel. One can chalk this up to the book's 1961 publication date or condemn the author as a misogynist. To its credit, Jill and other characters are stronger and more assertive than most characters appearing in novels of this era.

And there are long passages of preaching by Jubal, Michael, and others that sometimes grow tiresome. I would prefer the philosophy is told through the narration, rather than the characters making speeches.

But Stranger in a Strange Land is an enjoyable story, if you take the time to grok it.

Sunday, 26 August 2018 09:49:00 (GMT Daylight Time, UTC+01:00)
# Saturday, 25 August 2018

In an earlier article, I showed how to create an Azure Media Service; then, upload, encode, and share a video with that service.

In this article, I will show how to live-stream video content using Azure Media Services.

You will need to install some streaming software on your computer to do this. I chose Wirecast by Telestream. You can download a free trial at https://www.telestream.net/wirecast/overview.htm. You may use any software you like.

The 3 steps to live streaming with Azure Media Services are:

  1. Configure an Azure Media Service
  2. Stream your content with streaming software
  3. Share the stream

STEP 1: CONFIGURE AZURE MEDIA SERVICE

First, create an Azure Media Service, as described in Step 1 of this article.

Open your Azure Media Service and select "Live Streaming" from the menu to open the "Live Streaming" blade, as shown in Fig. 1.

Fig01-LiveStreamingBlade
Fig. 1

In the "Live Streaming" blade, click the [Quick create] button (Fig. 2) to open the "Quick Create Channel" blade, as shown in Fig. 3.

Fig02-QuickCreateButton
Fig. 2

Fig03-QuickCreateBlade
Fig. 3

At the "Name" field, enter a name for this channel.

Verify that the "Automatically start the channel after creation" checkbox is checked.

Click the [Create] button to create the channel.

After a few minutes, the channel will display with a status of "Running" in the list on the "Live Streaming" blade, as shown in Fig. 4.

Fig04-LiveStreamingChannelList
Fig. 4

NOTE: The Quick Create option creates a channel with RTMP protocol, Pass Through encoding, and no IP restrictions on viewing the stream. This works fine in many cases; but, if you would like different settings, you can click the [Custom create] button instead.

Click the channel in the list to open a blade for that channel's details, as shown in Fig. 5.

Fig05-ChannelDetails
Fig. 5

Note the INGEST URL (Primary) field. You will need this in your streaming software. The icon to the right allows you to copy this value to your clipboard.

Click the [Live event] button (Fig. 6) at the top of the Channel blade to open the "Live Event" blade, as shown in Fig. 7

Fig06-LiveEventButton
Fig. 6

Fig07-LiveEventBlade
Fig. 7

At the "Name" field, enter a name for your Live Event. It must be unique for this channel.

Click the [OK] button to create and start the live event.

PART 2: STREAMING SOFTWARE

You will need to configure your streaming software to stream to Azure Media Service. The instructions below are for Wirecast, but you may use any streaming software you like.

Launch Wirecast.

From the menu, select Output | Output Settings.

If prompted, set the Destination to "RTMP Server" and click [OK], as shown in Fig. 6

Fig08-Destination
Fig. 8

The "Output Settings" window displays, as shown in Fig. 7.

Fig09-OutputSettings
Fig. 9

In the "Address" field, paste the INGEST URL (Primary) value from the Azure Media Service channel blade from Step 1.

The Layers are at the bottom of the Wirecast UI. Select the [+] icon to the left of the first layer, as shown inf Fig. 8.

Fig10-LayerIcon
Fig. 10

In the "Add Shot" dialog, expand video capture and select your front facing camera and click the [Add] button, as shown in Fig. 9.

Fig11-AddShot
Fig. 11

You will see the image from the camera in the Preview window, as shown in Fig. 10

Fig12-PreviewWindow
Fig. 12

NOTE: Alternatively, you may wish to share a screen capture or a different camera or one of the other options.

The image captured from your camera will display in the "Preview" window. Make this the live image by clicking the "Go" button (Fig. 11) below the Preview window.

Fig13-GoButton
Fig. 13

The image will now also appear in the Live window to the right of the Preview window, as shown in Fig. 14

Fig14-PreviewAndLive
Fig. 14

From the menu, select Output | Start/Stop Broadcasting | Start RTMP Server, as shown in Fig. 15.

Fig15-Start Broadcasting
Fig. 15

An error displays if the channel is not running or if you improperly copied the Ingest URL.

PART 3: SHARE YOUR LIVE STREAM

Return to the Azure portal and open the "Live Event" blade, as described above.

Click the [Watch] button (Fig. 16)

Fig16-WatchButton
Fig. 16

If successful, you should see your live stream in a preview window, as shown in Fig. 17.

Fig17-ChannelPreview
Fig. 17

You can share the video by copying the "PLAYBACK URL" into any player. I did so using the Azure Media Player The results are shown in Fig. 18.

Fig18-AzureMediaPlayer
Fig. 18

In this article, I showed you how to use Azure Media Services to live stream a video.

Saturday, 25 August 2018 20:47:56 (GMT Daylight Time, UTC+01:00)
# Thursday, 23 August 2018

GCast 10:

Azure Linux Virtual Machines

Learn how to use the Chocolatey package manager to quickly install Windows applications and their dependencies.

DevOps | GCast | Video
Thursday, 23 August 2018 09:09:00 (GMT Daylight Time, UTC+01:00)
# Wednesday, 22 August 2018

19841984 by George Orwell describes a society in which everything is completely controlled by the government, which is controlled by "The Party". Not only are specific actions illegal, but so are many thoughts. Independent thinking, love, and questioning or even doubting the word of The Party are crimes dealt with in the harshest way. The Party has perfected ways of maintaining its authority.

In the giant country of Oceania, it is illegal to question anything the government says. If they tell you that 2+2=5, you must accept this without question.

Citizens routinely disappear, and all traces of their existence are wiped from the public record. Torture is a  common punishment for transgressions.

The country of Oceania is constantly at war with one of the other two countries in the world. No one has seen the war, but the threat of these enemies justifies oppressive measures against the citizens of Oceania.

Citizens are under constant surveillance - from pervasive electronic devices and from other citizens. Every home contains a Telescreen, that broadcasts party programs and watches and hears everything in the room 24 hours a day; Children are encouraged to inform on their parents and workers to turn in their colleagues.

The Party is developing a new language - "Newspeak", which eliminates dissident ideas by removing words that describe free thought as a way of eliminating the very concepts from the minds of the people.

The Party controls all communications, including newspapers, TV, and books. Books that do not glorify The Party are either destroyed or  rewritten.

When The Party changes its name or breaks a promise, or a prediction proves false, all previous news sources are modified to match the current dogma.

The mission of The Ministry of Truth is to rewrite newspapers and other historical records to match the current position of The Party.

Winston Smith is a low-level bureaucrat working in The Ministry of Truth. He has lost faith in the government, but his fear keeps him playing by its rules. Then, he meets and falls in love with Julia. Together they defy The Party by have a secret affair and, eventually, by plotting to actively work against The Party. Smith even keeps a secret diary of his thoughts and doubts - a serious offense.

Their affair gives them brief hope, but The Party is powerful, and its agents are far-reaching. And they know how to manipulate both actions and thoughts. Winston and Julia try desperately to maintain thier humanity, but The Party is desperate to maintain its power. Suffice it to say this is not a happy love story.

This book has maintained its importance in part because it is believable, despite the extremes of the society. It describes how those in power will do almost anything to maintain that power. Orwell's details are extraordinary. He builds a society with controls in place to suppress the populace completely.

If the book has any weakness, it is when it switches to explicit explanations of how the government is conspiring against its own people. For me, it was sufficient to watch Winston and Julia and the rest of the citizenry experience and suffer from these manipulations. But Orwell felt the need to spend pages detailing his warnings, which seems heavy-handed.

Orwell was a disillusioned ex-socialist and some of the novel touches on the failures encountered in socialist countries, such as shortages of essential goods. But 1984 is less about socialism than it is about the absolute corruption of absolute power.

The year 1984 has come and gone without the global dictatorship predicted by Orwell; but the warning signs listed in the book 1984 continue to haunt us today.

Orwell said, "The Party told you to reject the evidence of your eyes and ears" and we see politicians practicing this now. When people in power argue that "Truth is not truth" or "Alternative facts" are as valid as actual facts or that any news critical of themselves is "Fake news", they are exercising the same techniques about which Orwell warned us.  The concept of Thought Crime is still alive, if punishments are not as harsh as in Oceania. The far-right labels "unpatriotic" black men who peacefully protest; while the far left has successfully ruined the lives of people they deemed politically incorrect.

The bleak, dystopian future that Orwell describes has not come to pass. But its warning signs still exist. And 1984 reminds us that we must remain vigilant to avoid this future.

Wednesday, 22 August 2018 20:10:56 (GMT Daylight Time, UTC+01:00)
# Tuesday, 21 August 2018

Azure Media Services allows you to manage video content in a highly-scalable, highly secure way.

Videos and associated files are saved as "Assets" and stored in Azure Blob Storage. You can live stream videos or upload video files from your local system.

In this article, I will walk through the steps to upload, encode, and share a video.

The steps are:

  1. Create a new Azure Media Service
  2. Upload a video
  3. Encode the video
  4. Play the encoded video in the Azure portal
  5. Share the video in another player

Create a new Azure Media Service

The first step is to create a new Azure Media Service. You will need an Azure account to do this.

Navigate to the Azure portal and log in.

Click the [Create a Resource] button (Fig. 1) at the top left of the portal.

Fig01-CreateNewResource
Fig. 1

From the menu, select Mobile | Media Services, as shown in Fig. 2.

Fig02-MobileMediaServices
Fig. 2

The "Create Media Service" blade displays, as shown in Fig. 3.

Fig03-CreateMediaServiceBlade
Fig. 3

At the "Account Name" field, enter a unique name for your Azure Media Service Account.

At the "Resource Group" field, select the "Create new" radio button and enter a unique name for the resource group in which to store this Media Service.

At the "Location" dropdown, select an Azure region that is close to you.

Click the arrow next to the "Storage Account" prompt to expand the "Choose storage account" blade; then, click "Create new" in this blade to display the "Create storage account" blade, as shown in Fig. 4.

Fig04-NewStorageAccount
Fig. 4

Enter a unique name for the storage account in which to store your media assets and click the [OK] button.

Click the [Create] button in the "Create Media Service" blade to begin creating the service. This may take a a minute or so.

Upload a video

After the Media Service is created, open the service and select "Assets" to open the "Assets" blade, as shown in Fig. 5.

Fig05-AssetsBlade
Fig. 5

Click the [Upload] button (Fig. 6) to display the "Upload a video asset" blade, as shown in Fig. 7.

Fig06-UploadButton
Fig. 6

Fig07-UploadAVideoAssetBlade
Fig. 7

Click the Folder icon (Fig. 8) and select a video from your local computer.

Fig08-FolderIcon
Fig. 8

A progress bar indicates when the video has been uploaded. After your video is uploaded, close the "Upload a video asset" blade and  return to the "Assets" blade. The video should now appear in the Asset list, as shown in Fig. 9.

Fig09-AssetList
Fig. 9

Encode the video

In the "Assets" blade list, click on the uploaded video asset to display a property blade for the video asset, as shown in Fig. 10.

Fig10-VideoAssetProperties
Fig. 10

Click the [Encode] button (Fig. 11) to open the "Encode an asset" blade, as shown in Fig. 12.

Fig11-EncodeButton
Fig. 11

Fig12-EncodeAnAssetBlade
Fig. 12

In the "Encoding preset" dropdown, you may select the desired output format, but the default ("Content Adaptive Multiple Bitrate MP4") works well for this demo.

Click the [Create] button to begin encoding.

You can close the property asset blade now.

By staring encoding, you created a new Job for this media service. View this job by selecting "Jobs" in the Media Service blade, which displays the "Jobs" blade, as shown in Fig. 13.

Fig13-JobsBlade
Fig. 13

Note the status of the job you created, which will first be "Queued"; then "Processing"; then "Finished".

When the job is Finished (Fig. 14), close the "Jobs" blade and return to the "Assets" blade, where you should see a new Asset, representing the encoded video.

Fig14-FinishedJob
Fig. 14

Click the encoded asset to open its property page, as shown in Fig. 15.

Fig15-EncodeAssetPropertyPage
Fig. 15

Click the [Publish] button to display the corresponding "Publish the asset" blade, as shown in Fig. 16.

Fig16-PublishTheAsset
Fig. 16

Check the checkbox next to "To begin streaming, start running 'default' streaming endpoint".

Click the [Add] button to publish the encoded video asset.

Play the encoded video in the Azure portal

When the endpoint has started, the [Play] button in the encoded Asset property page is enabled (Fig. 17). Click the [Play] button to open the Media Player blade within the portal, as shown in Fig. 18.

Fig17-PlayButton
Fig. 17

Fig18-MediaPlayer
Fig. 18

Copy the PLAYBACK URL to use in the next step. It will look something like this:

http://dgtestms-usea.streaming.media.azure.net/1acb35e1-373c-481a-b37d-3e0e10394b0a/TelephoneLine.ism/manifest

Share the video in another player

It is unlikely your users will have access to your Azure Portal, so you should send them a link with a player they can use. You can use the free Azure Media Player to share your video.

Navigate to https://ampdemo.azureedge.net/azuremediaplayer.html

The page in Fig. 19 displays.

Fig19-AzureMediaPlayer
Fig. 19

In the URL field, paste your PLAYBACK URL (without the "http://") that you copied from the Azure Portal. It should look something like this:

dgtestms-usea.streaming.media.azure.net/1acb35e1-373c-481a-b37d-3e0e10394b0a/TelephoneLine.ism/manifest

Click the [Update Player] button. Your video should start playing.

To share this video and its players with others, click the [get share url] button and the displayed code. It should look something like this:

https://aka.ms/azuremediaplayer?url=%2F%2Fdgtestms-usea.streaming.media.azure.net%2F1acb35e1-373c-481a-b37d-3e0e10394b0a%2FTelephoneLine.ism%2Fmanifest

You can email this link to others or create a link on your web page.

Click on the dropdown next to the "Code" tab to see other ways to share this video and player.

In this article, I showed you how to upload, encode, and share a video using Azure Media Services.

Azure | Video
Tuesday, 21 August 2018 08:58:00 (GMT Daylight Time, UTC+01:00)
# Monday, 20 August 2018
Monday, 20 August 2018 08:25:00 (GMT Daylight Time, UTC+01:00)
# Sunday, 19 August 2018

ELOticketIt has been a long time.

Electric Light Orchestra had not played a concert in Detroit in 37 years. And it has been about the same amount of time since an ELO single cracked the US top 40. 

But despite peaking in the studio in the 1970s, enough 50-something rock fans remembered them with enough fondness to pack Little Caesars Arena Thursday night in Detroit.

Only Jeff Lynne remains from the ELO of their heyday; but Lynne was always the face of the band, as the lead singer, songwriter, and producer of most of their songs and albums. At age 70, Lynne looks the same as he did decades ago, his aging face hiding behind long brown curls, a beard, and dark glasses, just as it did during the band's heyday. His voice is still strong, although he delegated some of the lead vocals to another singer.

I made the trek to Detroit from Chicago in large part to reunite with some old high school friends and enjoy a night of memories.

Mr. Lynne did not disappoint. Known for pop melodies over complex arrangements, he brought with him a string section and 4 keyboardists to accompany his rock band and backing vocalists.

ELOinconcertThe set list was strong on the hits of the late 70s. For about 90 minutes, he played songs like "Evil Woman", "Do Ya", "Rockaria", and "Sweet Talkin' Woman" took me back to my high school and junior high school days. The acoustics were surprisingly good for a hockey arena and the sellout crowd responded to each memory the band played. He even played "Handle With Care" from his days with the Traveling Wilburys supergroup, delighting the audience with videos of him recording with Tom Petty, Roy Orbison, George Harrison, and Bob Dylan. ELO closed the set with some of their biggest hits: "Don't Bring Me Down", "Turn to Stone", and "Mr. Blue Sky". They were gone from the stage for barely a minute before returning to play an extended version of Chuck Berry's "Roll Over Beethoven".

For me, it was a chance to reconnect with my past. Old memories, old friends, old songs, and my old home town made Thursday night a special memory.

Sunday, 19 August 2018 23:34:23 (GMT Daylight Time, UTC+01:00)
# Friday, 17 August 2018

By default, when I create and launch a UWP app in Visual Studio, a debugging toolbar displays, as shown in Fig. 1.

Fig 1-DebuggingToolbar
Fig. 1

This can be useful during development, but it also can get in the way. It hides elements on my form and it does not look good during a demo.

Suppressing this toolbar is simple, but it took me some time to find it.

From the Visual Studio menu, select Tools | Options, as shown in Fig. 2.

Fig 2-ToolsOptions
Fig. 2

The Options dialog displays. Expand the "Debugging" section on the left and select "General", as shown in Fig. 3

Fig 3-DebugGeneralOptions
Fig. 3

Within the Debugging / General section, clear the checkbox next to "Show runtime tools in application"

Click the [OK] button to apply these changes. The toolbar will not display when you run your project from Visual Studio.

To re-enable this toolbar, open the Options dialog and check the checkbox and click [OK].

Friday, 17 August 2018 09:44:00 (GMT Daylight Time, UTC+01:00)
# Thursday, 16 August 2018

GCast 9:

Azure Linux Virtual Machines

Microsoft Azure supports many open source and non-Microsoft technologies, including Linux VMs. Learn how to create and connect to a Linux VM hosted in Azure.

Azure | GCast | Screencast | Video
Thursday, 16 August 2018 08:22:00 (GMT Daylight Time, UTC+01:00)
# Wednesday, 15 August 2018

Here is my presentation "Building and Training your own Custom Image Recognition AI" that I delivered in June at NDC-Oslo in Norway.

Building and Training your own Custom Image Recognition AI
Wednesday, 15 August 2018 09:53:00 (GMT Daylight Time, UTC+01:00)
# Tuesday, 14 August 2018

ClockworkOrangeA Clockwork Orange by Anthony Burgess is the story of Alex - a juvenile delinquent sociopath living in a dystopian society of the near future. Alex and his friends spend their days and nights  terrorizing anyone they can. Alex fills his life with rape, battery, robbery, and (eventually) murder. In prison, Alex becomes the subject of an experimental treatment that forces him to become violently ill at even the thought of violence or sex. He is released back into the violent society, where he is harmless, but has no way to defend himself.

This book is a morality play - primarily about whether removal of free will is justified if it results in greater lawfulness and whether the needs of society take precedence over the rights of individuals. The message is not subtle. Burgess fills the first third of the book with acts of extreme violence in order to emphasize Alex's corruption. When he is treated and released, his punishment comes quickly, harshly, and very violently.

One of the reasons I love this book is Burgess's creative use of language. It is told in the first person by Alex, who speaks in Nasdat, the slang of  his day. Burgess invented Nadsat by combining English and Russian words ("droog" for "friend"; "golova" for "head") with a bit of cockney rhyming ("pretty polly" for "money") and some childlike phrases ("appy polly loggy" for "apology"). This may slow down the reading as we must infer meaning of words from their context; but it adds a timeless quality to the book that it would not have had the author chosen an existing slang from a specific period. 

This book is not for everyone. The use of Nadsat makes it more difficult than most books of this length. Some readers will not be able to get past the violence. Some may think that, because of Alex's intelligence and charm, Burgess is glorifying him and his violence. But the author uses this violence as a setup for Alex's fall. Alex justifies his ultraviolent lifestyle because he lives in an ultraviolent society. But he takes this logic way too far, contributing mightily to the violence and blaming all his misfortunes on others. Still, he is proved right in a way, as he is completely unable to cope in a world when he becomes incapable of responding with any violence. Alex is a somewhat sympathetic anti-hero, but his soul is clearly corrupted - perhaps beyond redemption.

The book does not take a position on the moral questions it raises - particularly around the rights of individuals versus the safety of society. Clearly, Alex and his droogs were a great threat to their world and citizens feared even to go outside at night. But the government's solution was also a failure, causing them to re-think how they addressed crime.

Burgess himself did not count A Clockwork Orange among his best novels. He claimed he wrote it in just three weeks and he preferred stories with a subtler message.

But I loved it. I loved the language and the style. I loved the scenes that would mirror themselves in the beginning and end of the book. I loved the twisted sense of justice displayed in the story. And I loved how the beauty of the language contrasted so sharply with the ugliness of the actions it was describing. This tension kept me focused throughout the book.

It is a real horrorshow story that remains in the golova of me and my droogs.

Tuesday, 14 August 2018 09:51:00 (GMT Daylight Time, UTC+01:00)
# Monday, 13 August 2018
Monday, 13 August 2018 08:41:00 (GMT Daylight Time, UTC+01:00)
# Sunday, 12 August 2018

Here is my presentation "How Cloud Computing Empowers a Data Scientist" that I delivered in June at IT Camp in Cluj-Napoca, Romania.

ITCamp 2018 - David Giard - How Cloud Computing Empowers a Data Scientist from ITCamp on Vimeo.

Sunday, 12 August 2018 09:14:00 (GMT Daylight Time, UTC+01:00)
# Saturday, 11 August 2018

Here is my presentation “Own Your Own Career – Advice from a Veteran Consultant” that I delivered in June at IT Camp in Cluj-Napoca, Romania.

ITCamp 2018 - David Giard - Own Your Own Career – Advice from a Veteran Consultant from ITCamp on Vimeo.

Saturday, 11 August 2018 20:09:27 (GMT Daylight Time, UTC+01:00)
# Friday, 10 August 2018

I have a number of JavaScript projects that require an API key or other secret information that I don't wish to share with the outside world. This is a problem if I share the rest of the source code in a public GitHub repository.

Here is how I handle it.

  1. Create a getkey.js file with a single getKey function.
  2. Include getkey.js in my HTML document(s).
  3. Call getKey() from another JavaScript file, but wrap the call in a try/catch block. If an error occurs, warn the user that they must add this file / function.
  4. Add a .gitignore file to my project to exclude getkey.js
  5. Check the rest of the project into GitHub.

Create a getkey.js file

Here are the contents of my getkey.js file:

var getKey = function(){
    return "3899084ab2353243735944a95b0eba51";
}

Of course, the return value will be your appropriate key.

Include getkey.js in my HTML document(s)

JavaScript is called from script files referenced in my HTML documents. I typically have a file named "script.js", which contains the main functions for my page. So I include both that file and getkey.js within the <head> tag as shown below.

<script src="scripts/script.js"></script>
<script src="scripts/getkey.js"></script>

Call getKey() from another JavaScript file

From script.js, I add code to call the getKey() function within a try/catch block. This will throw an exception if the script cannot find the getKey function (usually because it cannot find the getkey.js file). In this example, I output a useful error message in a DIV with an ID of "OutputDiv".

Here is the relevant code.

const missingKeyErrorMsg = `<div>No key found.<br>
	This demo will not work without a key.<br>
	Create a script.js file with the following code:.</div>
	<div style="color:red; padding-left: 20px;">
	var getKey = function(){<br>
		&nbsp; &nbsp; return "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";<br>
	}
	</div>
	<div>where xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is your Azure Face API key</div>`

try {
	var subscriptionKey = getKey();
}
catch(err) {
	$("#OutputDiv).html(missingKeyErrorMsg);
	return;
}

Add a .gitignore file to my project to exclude getkey.js

I want to keep the getkey.js file locally, but I don't want to check it into GitHub. Adding a file named ".gitignore" in the root of my project allows me to list any files or folders that I don't want to include in my GitHub repository.

Add the following line to the .gitignore file

getkey.js

Check the rest of the project into GitHub.

Once the above steps are completed, it is safe to check it into GitHub. The getkey.js file will not be checked in. When another user checks it out, they will need to create this file. I recommend creating a read.me file and pointing this out.

Even if they forget, the error message should give them an idea why their code is not working.

There are other ways to address this issue, but this way works for me.

Friday, 10 August 2018 05:30:02 (GMT Daylight Time, UTC+01:00)
# Tuesday, 07 August 2018

WatchmenWho watches the Watchmen?

I remember reading Watchmen by Alan Moore and Dave Gibbons 30 years ago, when it was originally released as a 12-issue series. I waited for each issue and it took me a year to get through the entire story. But this week, I read the complete saga as a single volume and I think this is how Moore and Gibbons intended it. The story is complex enough that mysteries are introduced in one chapter and resolved several chapters later.

Although published by DC Comics, the story takes place outside the DC superhero continuity.

The main difference from the DC universe is the impact that superheroes had on their world, since first appearing on the scene in the 1930s. Originally, they were a group of costumed people with excellent athletic abilities and desire to fight crime. But things changed when Dr. Manhattan appeared on the scene. Dr. Manhattan was a physicist caught in an atomic experiment that gave him nearly godlike powers of strength, invulnerability, the ability to transport himself and other people and objects; and the ability to see forward and backward in time.

Dr. Manhattan working for the U.S. government greatly shifted the balance of power during the Cold War. In this world, the U.S. won the Vietnam War and Richard Nixon remained president for decades (Woodward and Bernstein's bodies were found in a parking garage and the Watergate scandal never came to light).

Costumed heroes eventually lose favor among the general public, which distrusts their great power; and by the police, who are frustrated by them operating outside the law as vigilantes.

The story follows a number of costumed heroes and former heroes:

  • The aforementioned Dr. Manhattan
  • The cynical and amoral Comedian, who works for the government or whoever will pay him the most
  • Retired hero Nite Owl - the second of that name
  • Ozymandias, who hung up his costume to start a business and become a billionaire
  • Rorschach, a psychopath with a strong moral compass that justifies him murdering criminals.
  • The Silk Spectre, who inherited that name from her mother, who pressured her into the superhero business.

It's a fascinating story, made better by all the little details - the graffiti on the wall in the background; the minor subplots (Rorschach’s psychiatrist is so troubled by his interactions with the hero that his marriage begins to crumble); the easter eggs (The pages of Chapter 5 are symmetrical, such that the last page mirrors the first, page 2 mirrors the second last, and so on); and stories within stories (a minor character reads a pirate comic throughout the series, which tells a morality play, not dissimilar to the one acted out by the major characters). One gets the feeling that multiple readings would reveal even more layers to the story.

But the strength of Watchmen is in the conflicting morals of each of the characters and the conflict this causes among the group. Some, like Ozymandias and Rorschach are absolutely convinced of their moral high ground; Dr. Manhattan loses his connection with the human race as he loses his humanity, and this affects his morality; The Comedian and the first Silk Spectre are in the superhero business for the fun of it; while others, such as Nite Owl and the second Silk Spectre, wrestle with questions of right and wrong and how to respond to evil.

The reader is confronted with moral questions, most of which go unanswered:

  • Do the ends justify the means?
  • Is nuclear deterrent (or superhuman deterrent) enough to preserve peace?
  • Does the universe need humans? Is it better with or without them?
  • What obligations do the powerful have to protect the powerless?

It is the last question that drives this story forward.

Watchmen changed the perceptions many had about comic books and graphic novels in the 1980s. Its dark themes and complex plots and characters were more than other titles at the time. As a result, the entire industry was challenged to produce at least some more titles that were heavier and higher quality than their normal super hero fare.

3 decades later Watchmen still stands up - not just as a graphic novel, but as a novel.

Tuesday, 07 August 2018 09:18:00 (GMT Daylight Time, UTC+01:00)
# Monday, 06 August 2018
Monday, 06 August 2018 08:14:00 (GMT Daylight Time, UTC+01:00)
# Sunday, 05 August 2018

8/5
Today I am grateful to visit the American Writers Museum for the first time.

8/4
Today I am grateful to tour the Clarke House Museum yesterday.

8/3
Today I am grateful for my first visit to Rosa's Lounge for the Thursday night blues jam.

8/2
Today I am grateful for my first visit to Door County, WI.

8/1
Today I am grateful for a bike ride around Sturgeon Bay, WI yesterday.

7/31
Today I am grateful for my first visit to a Wisconsin Supper Club.

7/30
Today I am grateful for lunch yesterday with Tim, Natale, and Emilija.

7/29
Today I am grateful for the summer party at my condo building yesterday.

7/28
Today I am grateful for breakfast yesterday with Kevin and Dustin.

7/27
Today I am grateful for dinner last night with Brent, Carl, and Michael.

7/26
Today I am grateful for:
-an amazing week at the Imagine Cup World Finals
-Lunch with Becky at the Microsoft expo
-Coffee with Steve

7/25
Today I am grateful for dinner with Nino last night in Seattle.

7/24
Today I am grateful to chat with a couple members of my new team.

7/23
Today I am grateful for a party last night at the University of Washington.

7/22
Today I am grateful for my first Kindle.

7/21
Today I am grateful for a walk through the natural area of Winnemac Park last night.

7/20
Today I am grateful to have had Dan and Rowena and their family visit this week.

7/19
Today I am grateful to successfully rebuild my 2 laptops yesterday and for Sergiy's help with this.

7/18
Today I am grateful for a walk around Chinatown last night with Rowena.

7/17
Today I am grateful to Dan for cooking me a steak dinner last night.

7/16
Today I am grateful to go to B.L.U.E.S. Chicago last night with Nick, Tim, and Natale.

7/15
Today I am grateful for my first visit to the Upper Peninsula of Michigan.

7/14
‪Today I am grateful to spend the past 2 days with Dan and Rowena and their family. ‬

7/13
Today I am grateful for my first visit to Mackinac Island. .

7/12
Today I am grateful for dinner last night in Pellston, MI at the home of Patrick and Susan.

7/11
Today I am grateful to have Nick at my place last night and to Tim for picking us up and taking us to dinner last night.

7/10
Today I am grateful to work with some top Chicago high schools students yesterday through Northwestern Academy.

7/9
Today I am grateful for
-a visit to the National Museum of American History yesterday
-a weekend in Maryland and Washington, DC

7/8
Today I am grateful to attend a family reunion this weekend and re-connect with so many of my extended family.

7/7
Today I am grateful for a visit to the National Aquarium in Baltimore yesterday.

7/6
Today I am grateful for:
-a visit to the Smithsonian National Museum of Natural History
-my first visit to Nationals Park, where I saw the larges comeback in franchise history yesterday

7/5
Today I am grateful I managed to get these family photos organized before the reunion.

7/4
Today I am grateful to live in the United States of America.

7/3
Today I am grateful for:
-a tour of Southern Illinois University
-a drive through Crab Orchard National Wildlife Refuge

7/2
Today I am grateful for my first visit to Carbondale, IL.

Sunday, 05 August 2018 11:11:00 (GMT Daylight Time, UTC+01:00)
# Saturday, 04 August 2018

TimeTravelersWifeHenry DeTamble has a genetic disorder that causes him to spontaneously be thrust backwards or forwards in time. This causes many problems. Henry often finds himself naked in unfamiliar surroundings where he must steal clothes, money and food to survive. He often returns to the same places - sometimes at a particular date and time; sometimes at varying points in time. For example, he has witnessed the death of his mother in a car crash dozens of times.

Henry is drawn repeatedly to a home near Grand Haven, MI, where he meets a little girl named Clare. Henry and Clare develop a friendship over the years as Henry appears in her life at random times and at random ages of Clare's childhood. Eventually, the two meet in real time, where they fall in love and marry.

When Henry and Clare meet in real time, it is Henry's first encounter with her; yet Clare has memories of a relationship with an older Henry that spans to her early childhood. 

The novel is written entirely in the first person, alternating between Henry and Clare's perspective - sometimes describing the same scene from each point of view. This gives us a good look at how Henry's disorder affects each of them differently and how they choose to deal with it.

The book is also written entirely in the present tense, as if they are narrating the events that are happening in their own timeline - wherever that happens to take them. This gives the story an immediacy and removes the certainty that either character will survive into old age.

Each chapter begins with the age of the characters who appear. Although Henry is 8 years older than Clare in real time, he is decades older in many of their encounters. Sometimes, Henry encounters a version of himself at different ages. The storytelling is necessarily far from linear. Often one character has memories of prior encounters that the other does not possess, which makes for an interesting dynamic.

The Time Traveler's Wife is one of the most imaginative novels I've read. In her first novel, Audrey Niffenegger has created both a science fiction story and a love story. As a time travel story, it covers the obligatory questions of free will, predestination, cause and effect, and the consequences of interacting with your own past. But those are secondary themes to the relationships of the people affected by Henry's sudden disappearances and appearances and the disruptions in their lives.

Much of the story covers how people deal with loss. Henry's father never recovers from the death of his wife; Henry deals with his disability by drowning in drugs, alcohol, and wanton sex - until he meets Clare, who inspires him to straighten himself out and live as normal a life as possible. Clare spends her life dedicated to and supporting Henry, even though he repeatedly disappears and she never knows if and when he will return.

I grew to care about this couple, who were blessed to be thrust together by destiny, but cursed by a unique affliction. Henry and Clare suffer through a relationship hampered by Henry's affliction and Clare's uncertainty; but they are held together by an honesty I found refreshing.

This was my second reading of The Time Traveler's Wife and it may not be my last.

Saturday, 04 August 2018 19:49:00 (GMT Daylight Time, UTC+01:00)

OceanAtTheEndOfTheLaneThe narrator of The Ocean at the End of the Lane returns to his childhood home and is surprised by the return of repressed memories. He was a sad and lonely child; He preferred books over sports and no one came to his seventh birthday party and his parents mostly ignored him; He did manage to befriend his neighbor Lettie Hempstock and her mysterious family.

The story quickly turns much darker.

A family boarder steals the family car and commits suicide in it; then a monster uses the boy's body as a means to enter this universe and terrorize the local people. The monster takes on a human form, calling herself Ursula Monkton and injects herself into the boy's family, moving into the home and seducing the father.

Lettie's family proves to be more than they seem as they battle Ursula and protect the boy from her/its threats.

I really enjoyed this novella, which began as a childhood memory and turned into a horror / monster story. The characters could have come from the dark fairy tales of Roald Dahl and the creatures and magic could have been found in the fantasy animated films of Hayao Miyazaki

I liked the moral ambiguity Gaiman presented. Ursula arrives with good intentions. She wants to give people what they want; but when she discovers that people want money, she hurls coins at them and makes money appear in their throat. Lettie summons creatures to defeat Ursula, but they are all then threatened by these powerful creatures.

The Ocean at the End of the Lane is one of NeillGaiman's shortest novels, but he packs a lot into the story.

Saturday, 04 August 2018 00:47:24 (GMT Daylight Time, UTC+01:00)
# Thursday, 02 August 2018

GCast 8:

Azure Virtual Machines

What is an Azure Virtual Machine? How do I create one?

Thursday, 02 August 2018 08:19:00 (GMT Daylight Time, UTC+01:00)