You are here

Feed aggregator

UNIT SOUZOU Brings Taiko Theater to Artist and Lecture Series

SPSCC Posts & Announcements - Thu, 05/14/2015 - 12:48

South Puget Sound Community College welcomes Portland-based taiko company UNIT SOUZOU as part of the college’s 2014-15 Artist and Lecture Series. UNIT SOUZOU will be on campus Thursday, May 14 at 7:30 p.m. at the Kenneth J. Minnaert Center for the Arts.

UNIT SOUZOU (pronounced SOH-ZOH), is the brain child of taiko veterans Michelle Fujii and Toru Watanabe. The co-directors share more than 20 years of experience, and have brought a fusion of traditional taiko and Japanese folk dance to UNIT SOUZOU. The performance is sponsored by the college’s Tomodachi club. The group will present their theatrically groundbreaking and imaginative work, “Insatiable.”

The South Puget Sound Community College Artist and Lecture Series brings a diverse group of distinguished scholars, activists and artists under a common theme: “Reflections.” Our presenters are recognized nationally or internationally for their work. Our hope is that they will initiate courageous and purposeful discussion within our community concerning critical and contemporary issues.

Tickets for UNIT SOUZOU are $10 for general admission, (which includes a $3 Washington Center service fee), and the event is free to all SPSCC staff, faculty and students. Tickets are available online at OlyTix.org or by calling The Washington Center for the Performing Arts box office at (360) 753-8586. For more information about the Artist and Lecture Series at South Puget Sound Community College, visit www.spscc.edu/ALSeries.

Posted 2-19-2015

Poet Laureate Elizabeth Austen Next In Campus-Community Read

SPSCC Posts & Announcements - Tue, 05/05/2015 - 11:56

Washington State Poet Laureate Elizabeth Austen is the focus of the current Campus-Community Read at South Puget Sound Community College, culiminating with a lecture from the author on May 5.

Austen's book "Every Dress a Decision" will be the centerpoint of of April 28 book discussion, which takes place at 5 p.m. and goes til 6:30 p.m. in The Center for Student Success (Building 22) in the Learning Support Services West office (formerly known as The Writing Center). 

Following an afternoon students-only workshop, Austen will then give a free, public lecture from 6-to-7:30 p.m. on Tuesday, May 5 in Building 21, room 130.

Learn more about the campus-community read online at www.spscc.edu/campus-read.

*Posted on April 21 at 11:57 a.m. PST.

Troubleshoot your Windows Phone certificate issues easily now!

MSDN Blogs - 2 hours 12 min ago
Hello everyone, hope you had a great weekend! Diagnosing certificate related issues on Windows Phones has been kind of a hassle so far. Even though you can provision certificates to Windows phones through the MDM channel, there was no UX to view the certificates that are installed on the phone. The "Certificates" app helps you with this and is available NOW on the Windows store. You can view the certificates installed in the "Personal", "Root" and "Intermediate certificate authority" certificate...(read more)

Having Fun with the Neon API

MSDN Blogs - 6 hours 16 min ago

One of the exciting things that got to do at South by Southwest last month in Austin was help with a hackathon where developers got to experiment with building new music apps and experiences.  As part of this hackathon, I helped a newly-independent artist, Neon Hitch release her own API in her own voice and wrote about it here on this blog and Billboard and The Daily Californian (UC Berkeley) blog wrote about it as well.

Since then, Neon Hitch has joined the Microsoft BizSpark program which gets her production company and label free software and Azure cloud services.  BizSpark is actually great for an independent artist who wants to do something innovative with technology because many musicians fit the BizSpark criteria:

  • Developing software or apps
  • Less than 5 years old and privately held
  • Making less than US$1M annually

Because Neon’s API is run with Azure API Management, the cost for her to manage and run the API, is basically $0.  Because Neon released an API, new opportunities can open up.  Here is one:

Kinetic Typography

I have had a fascination with Kinetic Typography.  Here is one of my favorite examples is Ira Glass talking about the creative process:

I like Kinetic Typography so much, I built an app for Windows to create it.  One of the reasons that I created it was to learn about how to use CSS Animations – it turns out you can do all sorts of things with CSS Animation today in any modern browser.

Since I released the app last year, I have added audio from NASA and words from some of my favorite poems, Jabberwocky by Lewis Carrol and Ozymandias by Percy Bysshe Shelley.  I just released an update to the app which uses the Neon API to let her fans create kinetic typography videos with her songs which she released with a Creative Commons License

Now make your own Neon Hitch Lyric Videos!

Get Kinetic Typography today for Windows 8.1: it’s free!

I’d love to see what people create with this – please post here if you make something cool with Kinetic Typography.

Experiencing Data Access issue in Azure Portal - 4/26 - Resolved

MSDN Blogs - 8 hours 57 min ago
Final Update: , 4/26/2015 20:18 UTC

We’ve confirmed that all systems are back to normal with no customer impact as of 4/26, 18:10 UTC. Our logs show the incident started on 4/26, 03:10 UTC and that during the 15 hours that it took to resolve the issue up to 67% of customers experienced some failures loading Application Insights parts in the Azure Portal.

• Root Cause: The failure was due to an edge case with static application metadata that caused incorrect values to be cached and returned to the user, which resulted in some users seeing some failures when loading Application Insights parts in the Azure Portal.
• Chance of Reoccurrence: Low; the repro requires a very specific set of event to happen in a very specific order
• Lessons Learned: We are evaluating options for changing the static application metadata cache settings, as well as evaluating adjustments to monitoring and alerting thresholds for this symptom.
• Incident Timeline: 15 Hours & 00 minutes - 4/26, 03:10 UTC through 4/26, 18:10 UTC

We understand that customers rely on Application Insights as a critical service and apologize for any impact this incident caused.

-Application Insights Service Delivery Team





Visualizing City of Chicago owned properties with Power BI Designer

MSDN Blogs - 10 hours 25 min ago

 

The week after next, I’ll be in Chicago to present at Microsoft’s Ignite conference.  I thought it would be fun to look at some data for the City of Chicago to see what I could do with it.  

Revenue is important to any city.  Developing enduring sources of revenue, whether through direct means like leasing city owned property or other ingenious ideas, is something every city planner needs to consider when thinking about where to spend precious resources.  Let’s see how the City of Chicago Data Portal (https://data.cityofchicago.org/) helps us.  I’ll use Microsoft’s Power BI Designer to do the analysis (free download).

Before I get too far into it, a word of caution: While the data and tools used are real, without more analysis no conclusions should be drawn as to what actions to take.  I’m not sure what the facts on the ground are in Chicago or any of the neighborhoods mentioned below.  Maybe someone’s already thinking about all of this.  In any case, let’s see what the numbers say…

I opened the City of Chicago Data Portal and found the “City-Owned Land Inventory” data set. 

As with any Socrata based data portals, you can get an OData url as shown below that makes it really easy to get the data into Power BI Designer.  Power BI Designer natively supports OData input so the data loads quickly and easily.

 

Now to do the mashup, I needed to get a sense of the rental rates in the City of Chicago.  So I looked around the web and found http://www.loopnet.com.  They have a set of tables that show various real estate market trends in Chicago, including lease rates.  There are a lot of different trends to choose from. I somewhat arbitrarily chose the Office Property Asking Rent – Lease Trends and chose the “Metro” rate for the analysis.  I wanted to use a nice representative number.

To get this data into Power BI Designer, I used the option Home->Get Data-> Web and entered the URL “http://www.loopnet.com/Chicago_Illinois_Market-Trends”.  I picker that opens has a bunch of tables in it and allows me to preview tables.  Some guess and check iteration is required, but eventually I found Table 28 is the one I wanted.

I called this table “RentalRates”. Now that I had reasonable rental rates, I could really get going with my mashup.  To figure out the “Potential Revenue” for each property I needed to multiply the square feet of the property by the rental rate.  This required some Power Query know how. 

I added a custom column called “Potential Revenue” to the “City Owned Properties” query.   The column does a look up in the RentalRates table for the rental rate for “Metro” which is what I wanted to use. 

Some technical details…

If you don’t care about technical details, skip down to the pictures below! But this little bit of exposition shows a couple of Power Query tips and tricks you might want to have in your tool belt.

Here’s what the “Potential Revenue” column’s formula looks like:

[sq_ft] *
Table.SelectColumns(
    Table.SelectRows(RentalRates, each ([Region] = "-Metro"))
    , {"$/sqft (Mar 15)"}
){0}[#"$/sqft (Mar 15)"]

Let’s step through what this does.  You need to read it from the inside out.

     Table.SelectRows(RentalRates, each ([Region] = "-Metro"))

This selects a row in the “RentalRates” table where the column “Region” has the text “-Metro” in it.  You might ask why I chose that string, it’s by inspection of the data value returned from the web page.  I could have cleaned it a little, but that’s for next time.

Next we have the Table.SelectColumns that selects the column I want.  That column as the name “$/sqft (Mar 15)”

Table.SelectColumns(
    Table.SelectRows(RentalRates, each ([Region] = "-Metro"))
    , {"$/sqft (Mar 15)"}
)

Now comes the tricky part.  What the above returns is a table with one column name “$/sqft (Mar 15)” with one row, and in that row is the value I want. So I can append the power query row indexer {0} to get the first row of the table and specify the power query column indexer [#"$/sqft (Mar 15)"] to get the value of the column named “$/sqft (Mar 15)”.  Notice the # sign.  What that does is it makes string an object that the system can compare against the column.

{0}[#"$/sqft (Mar 15)"]

Whew – so am I really crazy smart at Power Query to get this done? No not really.  The way I build that was using a trick.  In the queries list, I right clicked the RentalRates query and selected “reference”.  This creates a “RentalRates (2)” query that I can use the Power Query UI to filter to the right row and select the right column. Then I could select the cell I wanted, right click and select “Drill Down” this gives the following query.  Btw, on the “View” tab you can use the “Advanced Editor” to see and edit the queries.

let
    Source = RentalRates,
    #"Filtered Rows" = Table.SelectRows(Source, each ([Region] = "-Metro")),
    #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"$/sqft (Mar 15)"}),
    #"$/sqft (Mar 15)" = #"Removed Other Columns"{0}[#"$/sqft (Mar 15)"]
in
    #"$/sqft (Mar 15)"

With this query, I can easily get to the expression I used.  Now I did it that way because I was curious about indexing in in Power Query (I need to know all that for my day job). 

There’s an easier way to do it, that probably few people know about!  For analysts, instead of using “Drill Down”, I probably would recommend selecting “Add as New Query” on the drop down.  This makes a new query that returns the value of the cell you selected.  By default this gives a query with the name of the column.  After renaming the query to something like “metroRentalRate”.  What you should know is that in Power Query you can referenced other queries in your formulas.  In this case it’s easy since this query returns a single value. So your final formula for the “Potential Revenue” column would look like this:

[sq_ft] * metroRentalRate

Now that’s pretty nice.  You can remove the “RentalRates(2)” query since it’s not needed without breaking anything and you’re done with that part! As a side note when doing the above, I would still use the ‘reference query’ step since it results in a more efficient set of queries – the data will be downloaded by Power Query only once, rather than twice.

Beyond the above, I did some standard tweaks to the data returned from the OData feed.  To map addresses better, I created a couple of columns to help Bing geocode the addresses better. Here are the queries:

Street Address

= [address] & ", Chicago, IL, USA"

CMTY

= [cmty_area_name] & ", Chicago, IL, USA"

I think the second one is interesting.  The cmt_area_name contains names like “Englewood” that are regions within the city.  Bing has some knowledge of geographic boundaries alike Countries, States, Cities, Zipcodes.  You mileage may vary, but it’s pretty cool when it works, which it did in this case – see the filled map below.

I also used the “replace values” option on the “vacant” column to change the values from ‘true’, ‘false’, and ‘null’ to “vacant”, “occupied”, and “not specified”.  That’s much easier on the eyes.

Show me the data

Now that all the data modeling and queries are done, I created a few pages in Power BI Designer to show some of the data.  Using a TreeMap, I’m able to see part to whole analysis.  I created the view below to show potential revenue by ward number.  As you can see 4 wards account for the bulk of the potential revenue.  You’ll also see the distribution of properties across whether they’re vacant, occupied, or not specified. One very interesting thing in the TreeMap is that you can see how the number of properties in not specified is actually quite high but the potential revenue for those properties is extremely low.  The reason is that there’s very little square footage associated with these properties.  So they might be vacant lots.  What’s interesting about that is that vacant lots are sometimes easier to redevelop than lots with building on them already.


Below, I used the Filled Map feature to see which of the communities have the most vacant properties.  Filled Maps are sometimes called choropleth maps. You can see that there are a few neighborhoods with higher densities of vacant city owned property.  That clustering makes it interesting as a potential way to focus resources on those areas to avoid a peanut butter effect.

 

Lastly we can look at the wards with the most vacant property and see where all those properties are.  Again, you can see that clustering when looking at each property.  This suggest there might be some really big opportunity in those areas of Chicago.

Hope you liked this analysis.  You can find the final Power BI Designer file here:  Chicago City Property.pbix

You can get Power BI Designer for free by click here.

Also, if you haven’t yet, you can signup for Power BI for free by heading over to www.PowerBI.com.

-Lukasz

Azure Service Bus: Searching in Messages

MSDN Blogs - 11 hours 41 min ago

There are instances when we don't want a message with a certain content be processed. In such a case the biggest challenge is to find the message in the queue.

 

We can do the following -

1.      Stop the existing processor (may be a worker role which processes the messages)

2.      Run the attached LinqPad query.

3.      Open the xml file and find the message id by searching through message content.

4.      Deferring the message id.

 

 

Code:

       //Enter Azure Service Bus Connection string

       string connStr = "Endpoint=sb://xyzz.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=khskjhuhihdu=";

       //Enter Queue name

       string QueueName = "queuename";

       //Enter the number of messages to be searched.

       int messageCount = 10;

 

       QueueClient queue;

    ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.AutoDetect;

    NamespaceManager QNmSpaceManager = NamespaceManager.CreateFromConnectionString(connStr);

    if (!QNmSpaceManager.QueueExists(QueueName))

    {

        return;

    }

    else

    {

        queue = MessagingFactory.CreateFromConnectionString(connStr).CreateQueueClient(QueueName, ReceiveMode.PeekLock);

          

    }

                   

       var messageDS = new DataSet();

       var messageDT = new DataTable();

       messageDT.Columns.Add("Body");

       messageDT.Columns.Add("Properties");

       messageDT.Columns.Add("SequenceNumber");

       messageDT.Columns.Add("MessageId");

       messageDT.Columns.Add("EnqueuedTimeUtc");

       messageDS.Tables.Add(messageDT);

      

       foreach (var msg in queue.ReceiveBatch(messageCount))

       {

             //Please change the de-serialization logic incase using custom serializer.

             string msgBody = msg.GetBody<string>();

            

      

             string prop = JsonConvert.SerializeObject(msg.Properties);

             string seqNo = msg.SequenceNumber.ToString();

             string msgId = msg.MessageId;

             DateTime enqueDt = msg.EnqueuedTimeUtc;

      

             var DtRow = messageDT.NewRow();

             DtRow["Body"] = msgBody;

             DtRow["Properties"] = prop;

             DtRow["SequenceNumber"] = seqNo;

             DtRow["MessageId"] = msgId;

             DtRow["EnqueuedTimeUtc"] = enqueDt.ToString();

             messageDT.Rows.Add(DtRow);

       }

      

       //Writes the messages to xml.

       messageDS.WriteXml( @"e:\" + DateTime.Now.Ticks.ToString() + ".xml");

           

 

Azure Service Bus - Copy , dump and replay messages

MSDN Blogs - 14 hours 13 min ago

Introduction

 

While working with Azure service bus there are instances when we would like to copy or move messages from the queues. These activities arise while one is maintaining an existing production system which implements the service bus. Below you will find a few handy code snippets.

 

Refer Sample Code.

 

 

Dumping messages on Disk

 

There are times when we don't want a set of messages to be processed. There can be many reasons for it like the messages are giving some issues. You are working on a fix but it isn't yet deployed, So you basically want to park these messages and once the fix is in place reply these messages.

 

In the attached code, we do the following so as to back-up these messages in the disk and remove them from the queue.

1.      Connect to the Azure service bus.

2.      Receive messages

3.      Add the message body and other properties to DataSet

4.      Save the DataSet to xml

5.      Completes message i.e. removes messages from the queue.

 

        privatevoid dumpMessages()

        {

            log("started coping " + TopMsgCount.ToString() + " message ...");

 

            messageDS = newDataSet();

            messageDT = newDataTable();

            messageDT.Columns.Add("Body");

            messageDT.Columns.Add("Properties");

            messageDT.Columns.Add("SequenceNumber");

            messageDT.Columns.Add("MessageId");

            messageDT.Columns.Add("EnqueuedTimeUtc");           

            messageDS.Tables.Add(messageDT);

 

            BrokeredMessage msg = sbQueue.RecieveMessage();

           

            int cnt = 0;

            while (msg != null && cnt <= TopMsgCount)

            {

                #region "Message de-serialization section"

                string msgBody = msg.GetBody<string>();

                #endregion

 

                string prop = JsonConvert.SerializeObject(msg.Properties);

                string seqNo = msg.SequenceNumber.ToString();

                string msgId = msg.MessageId;

                DateTime enqueDt = msg.EnqueuedTimeUtc;

 

                var DtRow = messageDT.NewRow();

                DtRow["Body"] = msgBody;

                DtRow["Properties"] = prop;

                DtRow["SequenceNumber"] = seqNo;

                DtRow["MessageId"] = msgId;

                DtRow["EnqueuedTimeUtc"] = enqueDt.ToString();

                messageDT.Rows.Add(DtRow);

                msg.Complete();

 

                msg = sbQueue.RecieveMessage();

                cnt++;

            }

            messageDS.WriteXml(filePath + @"\" + DateTime.Now.Ticks.ToString()+".xml");           

            log("opertaion completed.");

        }

 

 

Note: Currently the code uses simple serialization and de-serialization techniques. Please change code accordingly to suite you.

 

Coping Messages

 

There are instances when we need to copy a set of messages on our local system for analysis and debugging but at the same time keep the messages in the queue. Like in cases you are getting an issue in message processing. So we stop the worker role (or the processing unit) so that the messages don’t move to dead letter. So we can copy these messages to disk for analysis while keeping the messages in the queue intact.

 

The below code snippet makes use of Receive Batch so as to copy bulk messages, but doesn't call complete batch. This doesn't changes the message ordering. Hence these messages remain as-is in the queue. The code does the following –

 

1.      Connects to Azure Service Bus queue

2.      Receive a set of messages

3.      Inserts these messages to DataSet.

4.      Writes to the DataSet to an xml file

 

        privatevoid copyMessages()

        {

            log("started dumping " + TopMsgCount.ToString() + " message ...");

            List<Guid> LockTokenList = newList<System.Guid>();

            var MessageList = newList<BrokeredMessage>();

            messageDS = newDataSet();

            messageDT = newDataTable();

            messageDT.Columns.Add("Body");

            messageDT.Columns.Add("Properties");

            messageDT.Columns.Add("SequenceNumber");

            messageDT.Columns.Add("MessageId");

            messageDT.Columns.Add("EnqueuedTimeUtc");

            messageDS.Tables.Add(messageDT);

 

            foreach (var msg in sbQueue.ReceiveBatch(TopMsgCount))

            {

                MessageList.Add(msg);

                LockTokenList.Add(msg.LockToken);

            }

 

            foreach (var msg in MessageList)

            {

                #region "Message de-serialization section"

                string msgBody = msg.GetBody<string>();

                #endregion

 

                string prop = JsonConvert.SerializeObject(msg.Properties);

                string seqNo = msg.SequenceNumber.ToString();

                string msgId = msg.MessageId;

                DateTime enqueDt = msg.EnqueuedTimeUtc;

 

                var DtRow = messageDT.NewRow();

                DtRow["Body"] = msgBody;

                DtRow["Properties"] = prop;

                DtRow["SequenceNumber"] = seqNo;

                DtRow["MessageId"] = msgId;

                DtRow["EnqueuedTimeUtc"] = enqueDt.ToString();

                messageDT.Rows.Add(DtRow);

            }

 

            messageDS.WriteXml(filePath + @"\" + DateTime.Now.Ticks.ToString() + ".xml");

           

            //Do not call CompleteBatch as it will remove message from the Queue.

            //sbQueue.CompleteBatch(LockTokenList);

           

            log("operation completed.");

        }

 

 

Note: Currently the code uses simple serialization and de-serialization techniques. Please change code accordingly to suite you.

 

Replay messages

 

The idea of replay messages is simply to put the messages present in the xml to any target azure service bus queue. Just make sure that the serialization and de-serialization technique is change if you are using something custom.

 

The below code snippet does the following -

1.      Read rows from Dataset

2.      Creates a brokered message i.e. serialize the content

3.      Sends the message

 

        privatevoid replayMessages()

        {

            messageDS = newDataSet();

            messageDS.ReadXml(filePath);

            log("Reading messages from " + filePath);

            messageDT = messageDS.Tables[0];

            log("Sending message count : " + messageDT.Rows.Count);

            foreach(DataRow dRow in messageDT.Rows)

            {

                string prop = dRow["Properties"].ToString();

                Dictionary<string,Object> msgPropDictionary = JsonConvert.DeserializeObject<Dictionary<string, Object>>(prop);

               

               

                string msgBody = dRow["Body"].ToString();

 

                #region "Message serialization section"

                var newMessage = newBrokeredMessage(((Object)msgBody));

                #endregion

 

                foreach (KeyValuePair<string, Object> propKayPair in msgPropDictionary)

                    newMessage.Properties.Add(propKayPair);

 

                sbQueue.SendMsg(newMessage);

            }

 

            log("message sent.");

        }

 

 

How and why I added an on-screen keyboard to my Windows Store app

MSDN Blogs - 15 hours 5 min ago

This post describes how I added an alphabetically sorted on-screen keyboard to my 8 Way Speaker app, and prevented the Windows Touch keyboard from appearing while my own keyboard was enabled.

 

Figure 1: The 8 Way Speaker app showing its own on-screen keyboard.

 

Background

A while ago I built an app which could be controlled through many forms of input. My goal was to have the app be usable as my customers’ physical abilities change. I ended up using the app in eight different ways, (including touch, mouse, keyboard, switch device, head tracking, and what I called “short movement touch”). A demo video of some of these forms of input as at 8 Way Speaker app for Windows 8.1.

The app itself uses the text-to-speech features available to Windows Store apps, (see Windows.Media.SpeechSynthesis,) to help people who can’t physically talk, to communicate in either a social setting or when presenting.

I also added an edit field to the UI, so my customers could type an ad-hoc phrase if they wanted to. Depending on the situation, the phrase might be typed with a physical keyboard, the Windows Touch keyboard, or the Windows On-Screen Keyboard.

 

Figure 2: The Windows On-Screen Keyboard docked beneath the 8 Way Speaker app, showing next word predictions while being used to type an ad-hoc phrase.

 

A request for a keyboard within the app

After making my app available at the Windows Store, I was contacted by a speech language pathologist who worked with a person who wasn’t familiar with the QWERTY keyboard layout, and would find it more efficient to enter text with an alphabetically sorted on-screen keyboard. So I was asked if I could add an alphabetically sorted on-screen keyboard to the 8 Way Speaker app.

I actually first wondered what it would take to have either the Windows Touch keyboard or Windows On-Screen Keyboard present alphabetically sorted keys. While this might be technically possible by using the Microsoft Keyboard Layout Creator, that approach would also change the layout of the keys when using a physical keyboard too. I felt that this had so much potential for confusion for people who’d never switched their input language before, that I decided not to go down this path.

So instead I added an on-screen keyboard within my app, with the keys sorted alphabetically.

 

Adding the keyboard

As always when I’ve got a request for a new feature for my apps, I’d start by adding a basic feature and enhance it as I get more feedback. So I added an on-screen keyboard with the 26 English letters, a Space key and Backspace key, and also an Enter key to have the phrase spoken. Of course, this is no use to non-English speakers, but as I get more requests I can update it with other worldwide characters, (and punctuation and numbers, and support for other input methods beyond touch and mouse).

And while we're on the subject of potential changes I can make to the app, one of the changes I'm most interested in is having the size of the text shown in the app be configurable by the user. All the text is pretty small in the app, including the text shown on the new on-screen keyboard. So this is a fundamental accessibility problem, and one I'd like to fix as soon as I have the chance.

I’d built my 8 Way Speaker app with HTML/JS, and decided to add all the new keys for the on-screen keyboard as buttons. This keeps things nice and simple for me.

So my new HTML looks like this:

        <!-- The Keyboard -->
        <div class="osk">
            <button id="oskKey1" class="oskKeyGroup" style="-ms-grid-row: 1; -ms-grid-column: 1">a</button>
            <button id="oskKey2" class="oskKeyGroup" style="-ms-grid-row: 1; -ms-grid-column: 2">b</button>
            <button id="oskKey3" class="oskKeyGroup" style="-ms-grid-row: 1; -ms-grid-column: 3">c</button>

            <button id="oskKey24" class="oskKeyGroup" style="-ms-grid-row: 2; -ms-grid-column: 11">x</button>
            <button id="oskKey25" class="oskKeyGroup" style="-ms-grid-row: 2; -ms-grid-column: 12">y</button>
            <button id="oskKey26" class="oskKeyGroup" style="-ms-grid-row: 2; -ms-grid-column: 13">z</button>
           

            <button id="oskKey27" class="oskKeyGroup" style="-ms-grid-row: 3; -ms-grid-column: 1;
                -ms-grid-column-span: 9" >Space</button>
            <button id="oskKey28" class="oskKeyGroup" style="-ms-grid-row: 3; -ms-grid-column: 10;
                -ms-grid-column-span: 2">Backspace</button>
            <button id="oskKey29" class="oskKeyGroup" style="-ms-grid-row: 3; -ms-grid-column: 12;
                -ms-grid-column-span: 2">Enter</button>

        </div>

 

And the related CSS:

.osk {
    display: -ms-grid;
    -ms-grid-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    -ms-grid-rows: 1fr  1fr  1fr;

    -ms-grid-column: 1;
    -ms-grid-column-span: 2;
    -ms-grid-row: 3;

    display: none;

    height: 150px;
    border-style: solid;
    border-width: 3px 0px 0px 0px;
}

.oskKeyGroup {
    background-color: white;

    border-style: solid;
    border-width: 1px;
}

 

With that simple change, I could present the alphabetically sorted on-screen keyboard that I’d been asked to add to the app.

 

Figure 3: Partial screenshot of the 8 Way Speaker app presenting an alphabetically sorted on-screen keyboard.

 

I also added a persisted option to show or hide the new on-screen keyboard.

        // Show or hide the keyboard as appropriate.
        var showOsk = localSettings.values["showOSK"];

        var osks = document.getElementsByClassName("osk");
        osks[0].style.display = (showOsk ? "-ms-grid" : "none");

 

A quick note on high contrast

The CSS above shows how I hard-coded the keys’ background color to white. But I wanted to be sure that the text on the keys was clearly visible when my customer was using a high contrast theme. For example, if the current theme displays white text on buttons, I didn’t want to end up presenting white text on a white background.

In order for the UI to look as the user needs it when a high contrast theme is active, I assumed I’d need to set a theme-related color for the background of the keys in the -ms-high-contrast section of the CSS.

For example:

        background-color: ButtonFace;

 

Indeed, if I do specify color and background-color in the -ms-high-contrast section, then these colors are used when a high contrast theme is active. But if I don’t specify colors in that section, then the color and background-color associated with the current theme will be used automatically when a high contrast theme is active.

So despite the fact that I’ve set a specific color to be used when a not-high contrast theme is active, I don’t have do anything to compensate for that when a high contrast theme is active. The colors the user needs are shown by default in high contrast. That’s good for my customers and good for me.

 

Important: I nearly always avoid handling pointer events, so why am I doing it in this app?

The HTML above doesn’t specify any event handlers to be called when the user interacts with the buttons on the on-screen keyboard. Instead I add those event handlers at run-time in JS, because that’s what I did with the other buttons in the app. I doubt there was any strong reason for me doing that, rather than adding the handlers in the HTML.

But there is one aspect of what I’ve done which is very, very important. The event handler I added is a pointerdown event handler.

    button.addEventListener("pointerdown", onPointerDownOskKey);

 

Normally, I would never use a pointerdown event handler to enable user interaction with a button. A pointerdown event handler will not get called when the Narrator user interacts with the button through touch. If instead of adding a pointerdown event handler, I’d added a click event handler, then the button would automatically be programmatically invokable by Narrator through touch.

Interestingly if I point the Inspect SDK tool at the keys to examine the UI Automation (UIA) patterns supported by my buttons, I can see that the Invoke pattern is reported as being supported, enough though the pointerdown handler won’t get called in response to the key being programmatically invoked.

 

Figure 4: The Inspect SDK tool reporting that the buttons on my on-screen keyboard are programmatically invokable.

 

As a test, I replaced my pointerdown event handlers with click event handlers, and found that the buttons then become programmatically invokable.

So the question is, why on earth would I intentionally add buttons that can’t be programmatically invoked?

The answer is that I want the keys to be as easy to invoke as possible by customers who find it a challenge to keep their fingers steady once they’ve touched the screen. A click event will only occur if the user lifts their fingers on the same UI element that the pointerdown occurred on. That means if some of my customers’ find it a challenge to keep their finger steady, the click event might not get generated. So by triggering the button action on the pointerdown event, it doesn’t make any difference if my customers’ fingers move to other elements while touching the screen. If I get requests from people wanting the buttons to be programmatically invokable while using Narrator with touch, I’ll add an option which controls whether pointerdown or click event handlers are used by the app.

I must stress that by default, I always use click event handlers in my apps, to ensure my customers using Narrator with touch can invoke my UI. My 8 Way Speaker is unusual in this regard, and uses a pointerdown event handler specifically to help my customers who find it a challenge to keep their fingers steady.

 

Preventing the Windows Touch keyboard from appearing

If your device doesn’t have a physical keyboard attached, then when you tap in an edit field in a Windows Store app, the Windows Touch keyboard will automatically appear. Usually, this is really helpful. But if my customer has set the option to show the app’s own alphabetically sorted on-screen keyboard, they don’t want the Windows Touch keyboard appearing at the same time.

As far as I know, there’s no officially supported way to suppress the Windows Touch keyboard when my customer taps in an edit field in an HTML/JS app like mine, so I’m going to have to get creative. The Windows Touch keyboard will programmatically examine the properties of the UI element with keyboard focus, as part of deciding whether it’s appropriate to appear. So maybe if I change the properties of the edit field exposed through UIA, that’ll prevent the Windows Touch keyboard from appearing.

By default, my HTML input element has a control type exposed via UIA of UIA_EditControlTypeId.

 

Figure 5: The Inspect SDK tool reporting the control type of the edit field.

 

I first tried setting different aria roles on the input element. Maybe by doing that, the Windows Touch keyboard wouldn’t consider the element to be something that accepts text. But in fact, I couldn’t prevent the Windows Touch keyboard from appearing by doing that.

So I then decided to set aria-readonly=”true” in the HTML for the input field, in the hope that the Windows Touch keyboard won’t appear if it’s told an edit field can’t accept text. And sure enough, when I did that the Windows Touch keyboard did not appear when I set keyboard focus to the field. So I could successfully avoid having two on-screen keyboards appear at the same time. But you’re now thinking that this is a pretty dodgy thing to do, right? I’m programmatically declaring the input field to be read-only, when in fact it’s not read-only at all. If some other UIA client were to examine the input field, it’ll be misled, and maybe my customer will be blocked from accessing the field. And you’re right, it is a pretty dodgy thing to do. But for me, I want to enable my customer regardless. If I only set aria-readonly=”true” when my alphabetically sorted on-screen keyboard is showing, then the input field will programmatically behave as expected at all other times. So whenever the related option changes, I do this:

        // If the OSK is visible, mark the edit field as aria-readonly.
        adHocMessageEditField.setAttribute("aria-readonly", showOsk);

 

The end result is that the input field behaves as usual when my on-screen keyboard is not visible, but when it is visible, the Windows Touch keyboard will not appear. This implementation might be a tad unconventional, but it’s well worth it if it means I can deliver the feature my customer needs.

 

That’s all very well, but what about my XAML app?

In order to suppress the Windows Touch keyboard in a XAML app, again it’s a case of changing the properties of the edit field that are exposed through UIA. The Windows Touch keyboard will not appear if the UI element with keyboard focus does not support the UIA Text pattern. By default, a XAML TextBox does support the UIA Text pattern.

I’ve just created a new test XAML app with a TextBox, and when I point the Inspect SDK tool to it, I see that the TextBox supports the Text pattern.

 

Figure 6: Inspect reporting that my TextBox supports the UIA Text pattern.

 

I then created a custom control derived from the TextBox, and associated that control with a custom AutomationPeer derived from TextBoxAutomationPeer. (I posted some details on custom AutomationPeers, at Does your XAML UI support the Patterns that your customer needs?)

Maybe it’s possible for me to change the custom AutomationPeer’s GetPatternCore() to declare that the custom TextBox doesn’t support the TextPattern, but I didn’t try that. Instead I thought I’d go with the same approach as I did with my 8 Way Speaker app, and programmatically declare the TextBox to be read-only. The UIA Value pattern has a read-only property, and I can see with Inspect that my TextBox automatically supports the Value pattern. I wondered if I might be able to use that to prevent the Windows Touch keyboard from appearing, so I first tried overriding the existing IValueProvider.IsReadOnly property supported by the TextBox. I didn’t have any luck doing that, and I don’t know why not. Maybe MSDN would make it clear why I couldn’t override the TextBox’s read-only property, but I’m at 36,000 feet as I type this with no access to MSDN.

So instead, I simply implemented IValueProvider directly on my custom AutomationPeer. I didn’t bother doing anything with the other members of IValueProvider, because I’ve effectively broken programmatic access of the TextBox anyway by declaring the control to be read-only when it isn’t.

And I ended up with this test code:

    public class MyTextBox : TextBox
    {
        protected override AutomationPeer OnCreateAutomationPeer()
        {
            return new MyTextBoxAutomationPeer(this);
        }
    }

    class MyTextBoxAutomationPeer : TextBoxAutomationPeer, IValueProvider
    {
        public MyTextBoxAutomationPeer(MyTextBox owner)
            : base(owner)
        {
        }

        protected override object GetPatternCore(PatternInterface patternInterface)
        {
            // If the caller's looking for the Value pattern, return our own implementation if this,
            // not the TextBox's default implementation.
            if (patternInterface == PatternInterface.Value)
            {
                return this;
            }

            return base.GetPatternCore(patternInterface);
        }

        // Implement IValueProvider members.

        public bool IsReadOnly
        {
            get
            {
                // Always return true here to prevent the Windows Touch keyboard
                // from appearing when keyboard focus is in the control.
                return true;
            }
        }

        public string Value
        {
            get
            {
                return "";
            }
        }

        public void SetValue(string test)
        {
        }
    }

 

Summary

Adding an alphabetically sorted on-screen keyboard to my 8 Way Speaker app has been interesting for me in a number of ways. Adding the keyboard itself was quick ‘n’ easy to do, but I considered the following topics carefully:

1.  I deliberately implemented the keys in such a way that a customer using Narrator with touch could not invoke the keys. I’d normally never do that, but I did it for this app to help customers who find it a challenge to keep their fingers steady. I can add Narrator support in the future if I’m asked to.

So when building your invokable UI, don’t forget to use click event handlers rather than pointer event handlers. Otherwise your customers who are blind will probably be blocked from leveraging all your great features.

2. I experimented with my app’s programmatic interface that’s exposed through UIA, until I found a way to prevent the Windows Touch keyboard from appearing while my own alphabetically sorted on-screen keyboard’s visible. As far as I know, my solution’s not supported, and could break over time, and could interfere with other assistive technologies which use UIA to interact with my app. But I decided to make the change anyway.

At the end of the day, I decided to do whatever it takes to implement the user experience that my customer needs. I’ll look forward to hearing how my customer would like to have the new on-screen keyboard enhanced in the future. The updated app’s up at the Windows Store app 8 Way Speaker.

All in all, it’s been a fun learning experience for me! :)

Guy

 

SQL Server Performance Tuning: Creating a Shell Database to tune your Production queries

MSDN Blogs - 21 hours 46 min ago

On so many occasions have we encountered situations wherein during a performance issue on Production , we struggled to mimic or reproduce the issue on another environment. Some of the usual steps we follow, to debug these type of issues are :

 

  1. Request for a Read Access with permissions to access the DMVs on Production.
  2. Request for a Production Backup and restore it on a different environment to analyze.
  3. Run Extended Events / SQL Profiler on the Production Databases.

 

These methods work and are quite fruitful too. But they can sometimes be time consuming. Are there any quick ways? Sure is.

 

One of the very interesting yet a less known feature SQL Server offers is that you can script out all the necessary metadata, statistics that a SQL Optimizer uses (to optimize a query) , and load it in another server to do the analysis. Some benefits are :

 

  1. The DBA is happy that you will not run excess load on production servers to tune the queries
  2. There is no need to copy backup of huge databases across networks from production to test environments, thereby saving valuable time.
  3. There is no need to figure out as big a disk space on your local environment as it is in Production.
  4. In event of databases having sensitive information, there is no compromise as there is no movement or copying of data to another environment.
  5. New indexes created on the shell database also have their statistics updated as per the stats available on other indexes in the table.

 

Just to note that this is absolutely not a panacea for creating an environment for doing all forms of performance tuning. It serves a purpose where we want to tune queries based on the statistics currently available on Production. 

 

Let's see how this can be done.

 

Step - 1 : Right Click on the Database , go to Tasks -> Generate Scripts

 

 

Step - 2 : On the Generate and Publish Script Window, select the objects you want to script out.

 

Step - 3 : On the Set Scripting Options Tab of the Window, provide a location to where the file can be generated and then  click on the Advanced Button 

 

 

Step - 4 : On the Advanced Scripting Objects, change the default values of the given properties to values mentioned below

 

Property

Value

Script Statistics

Script Statistics and Histograms

Script Indexes

True

 

Once Done, click on Finish to generate the script. This script may now be used to re-create the objects on a different environment.

 

Since I am performing the activities on the same machine, I have edited the script to change the database name from AdventureWorks2012 to AdventureWorks2012Shell.

 

Now, assuming a query (like the one below) is causing some performance challenge on production.  This can now be run on this newly created database for analysis. One can observe that although there are no records returned, it uses the statistics from our source Database (Look at the Estimated Number of Rows Property), like so.

 

 

 

Now as part of the analysis, we would like to validate if creating a new index will help remove the clustered index scan. Let's go create one on column ModifiedDate.

 

Running the same query again, shows that the SQL Optimizer chose to use the newly created index. This way, we can validate usage of new indexes based on the statistics on our Production Server.

 

 

Thanks 

Windows 10, Redis and NoSQL

MSDN Blogs - Sat, 04/25/2015 - 09:35
If you want to get started with Redis, a form of NoSQL as you begin to adapt to WIndows check out the MVA presented by Steven Edouard and Rami Sayar @ramisayar. Go to this link immediately: http://bit.ly/redisquickstart Why? It is useful to get to know the cloud and the related technologies as you also plan for the move to Windows 10 for your Windows 8.1 and Windows 7 apps.  As a software developer you will need to understand how to use Platform as a service, this saves you a great deal of time...(read more)

Preparing for Universal Windows Development

MSDN Blogs - Sat, 04/25/2015 - 08:02

Windows 10 is coming, and I can’t help but be excited.  I won’t go into many specific details here, but through the Insider Program you can already check out a Windows 10 Technical Preview https://insider.windows.com/.  I encourage everyone to go check it out along with Visual Studio 2015, https://www.visualstudio.com/downloads/visual-studio-2015-ctp-vs, to get a jump on the development for Windows 10.  The BUILD 2015 conference starts at the end of April which will be cover all of the exciting announcements around Windows 10,  but to help facilitate the process, I’ve found a study guide created by fellow Technical Evangelist, Nick Landry @ActiveNick. 

  ABSOLUTE BEGINNERS

Start with this section if you’re completely new to programming, or if you are completely new to app development in general.

C# Fundamentals for Absolute Beginners
Want to learn a different language? Over the course of 25 episodes, our friend Bob Tabor, from www.LearnVisualStudio.net, teaches you the fundamentals of visual C# programming. Tune in to learn C# concepts applicable to video games, mobile environments, and client applications. We walk you through getting the tools, writing code, debugging features, customizations, and much more! Each concept in this C# for beginners course is broken into its own video so you can search for and focus on the information you need.

Introduction to Mobile App Development
Nothing motivates students more than building an app that they care about and that they can immediately see, use, and share. Get insights from Windows Platform Developer MVP​ Lance McCarthy, as he teaches students to build a mobile app using Windows App Studio and to then extend and enhance the app using Visual Studio. Students learn the basics of the app ecosystem and Software Development Lifecycle. They also learn about code modification and additional basic app coding skills, including the topics of variables, simple data types, conditional programming constructs, and simple library classes. This course addresses AP Computer Science learning requirements.

Windows Phone 8.1 Development for Absolute Beginners
Join Bob Tabor (LearnVisualStudio.NET) for this 9+ hour series as he covers Windows Phone UI with XAML layout and events, navigation model, application lifecycle, and working with the Windows Phone Emulator. This course focuses on Windows Phone development for beginners as Tabor explores understanding XAML, MVVM (Model-View-ViewModel) and HTML apps in the WebView. Get details about storage, maps, animations, and media (video/audio with the MediaElement control). Build five apps, covering a range of scenarios, from media playback to hosted HTML, from accessing geolocation data and mapping to extending your Windows Phone app to become a universal Windows/Windows Phone app. These Windows Phone development tutorials will build a firm foundation for your future in mobile app development.

BEGINNER / INTERMEDIATE-LEVEL WINDOWS PHONE or WINDOWS STORE DEVELOPERS

Start with this section if you are an experienced developer but new to app development on Windows, or if you have some experience with Windows Phone and/or Windows Store development but your knowledge is spotty.

Building Apps for Windows Phone 8.1 Jump Start
If you’re an app developer who wants to design and build apps for Windows Phone 8.1 using XAML and C#, check out this two-and-a-half day, on-demand course, taught by experts with years of experience developing—and writing about the process. The sessions focus on building apps for Windows Phone 8.1 in Visual Studio and creating universal app projects that share a high percentage of code and that target both Windows and Windows Phone. Get tips and tricks on maximizing your app compatibility and optimizing your code. Find out about new features, and learn how to program the many new Windows Runtime APIs that are available to both Windows Store apps and to Windows Silverlight apps. You can even get code samples. Want to build an app? Watch this course and make your apps for Windows Phone world-ready!

Developing Universal Windows Apps with C# and XAML
Get real-world guidance for developing creating universal Windows apps, and save yourself valuable time when creating developing an apps for today’s mobile workforce and consumer marketplace. Learn from Microsoft experts as they build a working app using XAML and C# development tools and techniques that can give you a dramatic advantage as a developer when targeting both Windows and Windows Phone devices. See what’s smart to share and what’s not, when developing for the two platforms. Explore a broad range of features, covering both consumer and enterprise scenarios. Jerry Nixon and Daren May bring together best practices and key insights from Microsoft internal teams, including the built-in code-generation tools in Visual Studio that can automatically build out hundreds of classes and thousands of lines of code.

EXPERIENCED / PUBLISHED MOBILE DEVELOPERS ON WINDOWS

So you’ve published some apps already and you think you’re an expert? I bet you can still learn a thing or two. Check out these MVA courses and feel free to pick & choose the individual modules that interest you the most. In any case, make sure to watch the last MVA course listed here: A Developer’s Guide to Windows 10 Preview.

Azure Mobile Services and API Management
Want your business to compete in a mobile first, cloud first world? Microsoft Azure can help. For example, Turnkey API Management capabilities help you share APIs with partners securely, and Mobile Services help you to build enterprise-grade mobile experiences for consumers and employees alike, in record time. Get the details and helpful tips from the experts, in this practical course.

Windows 8.1 Developer Training: Geek Edition Jump Start
HTML and XAML developers, are you ready to start having fun with Windows 8.1? Join Microsoft experts for an on-demand version of the highly successful dive deep into the gadget and devices side of Windows 8.1. Explore 3D printing, the LEGO EV3 platform (and how to use it from Bluetooth and USB), how to get speech out of your modern app, and more. See some exciting demos, and find out about awesome new features in both HTML and XAML. Build on your core skills, take advantage of everything Windows 8.1 has to offer, and dive into the Internet of Things (IoT).

While the whole course is definitely interesting, allow me to call out these specific modules to round-out your Windows app development knowledge:

  • Module 4 – Speech, Camera and Microphone
  • Module 7 – Bluetooth Overview
  • Module 10 – Performance

Universal Windows App Development with Cortana and the Speech SDK
Want to add Cortana to your app? Whether you’re into speech integration technology for accessibility, social responsibility, or gaming (or all of the above!), you’re probably excited about the possibilities that Cortana offers for Windows Phone developers today and Windows 10 app developers in the near future. Mobility pioneer Nick Landry and popular author/teacher Jeremy Foster share their practical experience in computer speech technologies and mobile app development scenarios. Explore the why and how of speech apps, tour Cortana, and review the capabilities of the Speech SDK in Windows and Windows Phone. Work with speech synthesis, look at integrating Cortana into your app, check out voice commands, and find out how to build speech-enabled mobile apps with Visual Studio for Windows devices. You’d be surprised at what you can do with as little as three lines of code!

A Developer’s Guide to Windows 10 Preview
Would you like a preview of the developer tools for Windows 10? If you’ve signed up for the Windows Insider program, get early access and a head start on developing for Windows 10. Plus, you can offer your feedback to help us shape it!
Join experts Jerry Nixon and Andy Wigley as they introduce the Windows 10 developer platform, give guidance on developing Windows universal and web apps, and take a look at some of the interesting new features for developers in Windows 10.

Aventuras de un GameDev

MSDN Blogs - Sat, 04/25/2015 - 06:43

Tal vez ya hayan visto mi anterior publicación acerca de mis videos en Twitch. Pero ya que he empezado a crear varias sesiones en Español, pensé que era un buen momento para compartirlo con todos ustedes.

No olviden que pueden ver todas my sesiones en mi Canal en Twitch http://www.twitch.tv/hielo777/ y todos los videos, en Inglés y en Español, son subidos a mi Canal en YouTube.

Los 3 primeros videos en Español cubren lo básico de la creación de un juego de Torres de Defensa con Construct 2. 

 

 

Usando Construct 2, se puede facilmente crear una sólido juego de Torres de Defensa, y en esta serie, que trataré de realizar a la vez en Español e Inglés, cubriré todos los aspectos de este tipo de juegos.

Todos los comentarios en los videos son bienvenidos.

 

Durante el fin de semana estaré preparando video #4:

Bien Débuter avec le Small Basic (fr-FR)

MSDN Blogs - Sat, 04/25/2015 - 03:00

Vous avez décidé d'apprendre le Small Basic, mais vous vous sentez un peu perdu ?

Voici quelques liens et informations utiles pour vous aider.

Références

Tout d'abord voici les liens de référence sur le Small Basic qui vont seront toujours utiles:

 

Informations pour commencer

Avant de commencer il y a quelques informations qui peuvent être utiles à lire.

 

Installer Small Basic

Tout d'abord il vous faut installer le Small Basic.

  • Télécharger Microsoft Small Basic : cet article explique quelle version de Small Basic télécharger et installer en fonction de la version de votre Windows. Suivez bien les instructions fournies.
Ensuite commencez par prendre en main l'Environnement Small Basic (ou EDI).  Faire ces premiers programmes

Maintenant vous pouvez commencer à faire des programmes:

Ensuite vous pouvez étudier chaque sujet couramment utilisé dans le Small Basic.

 

Aller plus loin

Une fois que vous avez une meilleure connaissance des possibilités du Small Basic vous pouvez commencer à étudier des sujets plus complexes:

Vous avez également des exemples de programmes a étudier pour comprendre certaines méthodes de programmation ou techniques. Attention ces programmes n'ont pas encore été tous traduits:

 

Aide et Participation 

Il va vous arrivez un moment où vous serez certainement bloqué face à un problème, il y a des gens qui peuvent vous aider sur le forum: 

Dans ce forum en plus des différentes questions, vous trouverez des discussions sur des exemples de programme que propose d'autres personnes, ou sur des méthodes de programmation et la manière de les utiliser par exemple. C'est une très bonne méthode d'apprentissage également.

Vous aussi vous pouvez y participer en montrant votre code pour discuter de la bonne application de certaines méthodes, ou tout simplement pour montrer ce que vous faîtes en programmation. 

Avant de de visiter le forum veuillez bien lire cet article sur comment utiliser le forum, ça vous aidera à poser des questions qui auront une réponse plus rapidement.

Pour rappel vous pouvez poser vos questions en français sur le forum, toutefois pour avoir un maximum de chance de réponse, il est préférable de la poser en anglais. Si vous n'êtes pas à l'aide avec l'anglais, nous vous conseillons d'écrire votre question en français, et d'ajouter la traduction en anglais de votre question (utilisez les traducteurs automatiques Bing ou Google). Dans ce cas mettez le titre de votre question dans les deux langues et ajoutez "(fr-FR)" à la fin de la partie française. Indiquez également que vous ne parlez que français, cela aidera les personnes qui répondent.

Pour conclure

N'oubliez pas que Small Basic est fait pour apprendre la programmation en s'amusant, alors amusez vous !

Tous ces liens sont extraits du Portail Small Basic, il est modifié régulièrement au fur et à mesure que la communauté ajoute des articles, alors visitez cette page de temps en temps pour voir ce qu'il s'y passe.

 

A bientôt avec le Small Basic en français,

Ninja Yan

Windows 10 Enterprise management sessions @ Ignite

MSDN Blogs - Sat, 04/25/2015 - 00:04
The next couple weeks are exciting!! We are going to have a lot of interesting sessions at both the //Build conference in SFO (April 29 – May 1) and the Ignite conference in Chicago (May 4 – May 8). Lots of great keynotes, sessions, speakers and lots of technology in the air! I have the below session @ Ignite where I'll talk about the new MDM features in Windows 10. I'm super excited to walk you through this and am looking forward to hearing your comments and feedback. Windows 10 Mobile Device...(read more)

[Sample Of Apr. 25] How to convert excel file to xml format

MSDN Blogs - Fri, 04/24/2015 - 23:32
Apr. 25 Sample : https://code.msdn.microsoft.com//How-to-convert-excel-file-7a9bb404 The sample demonstrates how to convert excel file to xml format using Open XML SDK. You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension . They give you the flexibility to search samples, download samples on demand, manage the downloaded samples...(read more)

Experiencing Data Access issue in Azure Portal - 4/25 - Investigating

MSDN Blogs - Fri, 04/24/2015 - 23:30
Initial Update: Saturday, 4/25/2015 06:29 UTC

We are aware of issues within Application Insights and are actively investigating. Some customers may experience Data Access issue. The following data types are affected: Customer Event, Dependency, Exception, Metric, Page Load, Page View, Performance Counter, Request, Trace.

• Work Around: none
• Next Update: Before 08:30 UTC

We are working hard to resolve this issue and apologize for any inconvenience.

-Application Insights Service Delivery Team

5 years, 3 teams and 2 countries

MSDN Blogs - Fri, 04/24/2015 - 23:21
It's been about 5 years since my last blog post and since then I've moved 3 teams within Microsoft. And I moved across continents too J I moved to the Windows Security team in 2010 where I worked for around 4 years on smartcards & biometrics first, then Bitlocker for a while and the last couple years on Platform security focusing on TPM, secure boot and UEFI. It has been a great experience and I've learnt a lot during this time. For the last one year, I've been on the Operating system...(read more)

Microsoft Azure Media Services 即時編碼 (Live Encoding) 簡介

MSDN Blogs - Fri, 04/24/2015 - 22:51

感謝北科大劉建昌同學協助翻譯微軟公司 Azure Media Services 主管 Anil Murching 於 2015/4/13 發表的文章 An introduction to Live Encoding with Azure Media Services ( http://azure.microsoft.com/blog/2015/04/13/an-introduction-to-live-encoding-with-azure-media-services/ ) ,目前本篇所介紹之內容尚未進入公開技術預覽階段,欲參與 Azure Media Services 即時編碼功能技術預覽的用戶請發信至 amslived@microsoft.com 申請。

自從去年我們發佈了 Microsoft Azure Media Services 即時直播服務 ( Live Streaming ) 之後,相當多的使用者已經透過這項兼具穩定性和高擴充性的服務來進行影音串流直播。您若有興趣可以參考之前撰寫的這篇文章,裡面有詳細的資訊,介紹如何使用 Azure 入口管理網站或是 .NET SDK 以 Microsoft Azure Media Services 來進行影音串流直播。

在過去為了要進行直播串流 ( Live Streaming ),您需要自行準備一個第三方的編碼器 ( Encoder ) 來產生多個不同畫質之 adaptive bitrate streaming 串流並發佈到 Azure Media Services 上。隨著 Azure Media Services 即時編碼 ( Live Encoding ) 功能進入技術預覽階段之後,您無須再耗費這麼多的傳輸頻寬,同時傳送多種畫質的影音片段,取而代之的是您能夠傳送一個最高畫質單一位元率 ( BitRate ) 串流到 Azure Media Service,而這個單一的串流可以在雲端編碼成各種畫質 adaptive bitrate streaming。之後您就能夠將這些內容以 MPEG-DASH、Microsoft Smooth Streaming、 Apple HLS、Adobe HDS 等通訊協定將影音串流直播至多種用戶端環境來播放。

在這篇文章中,我將介紹如何在 Microsoft Azure Media Services 下使用即時編碼 ( Live Encoding ) 相關功能,包含:

  • 餵入單一位元率之影片,透過即時編碼功能產生 adaptive bitrate streaming 多種畫質之編碼影片
  • 透過 RTP ( MPEG Transport Streams )、RTMP、Smooth Streaming 等協定擷取傳遞 ( ingest ) 即時串流
  • 控制插入廣告訊號到客戶端
  • 由即時串流影片餵入時,取得影片之縮圖預覽

 

何謂即時編碼 ( Live Encoding )

當您在轉播一個即時事件 ( Live Event ) 時,最希望達到的目標就是傳送高品質的視訊以及不管在任何的網路環境下,都能夠將畫面傳送任何使用者可能擁有之裝置上。解決品質和不同網路環境影片播放的最佳方法,就是透過 adaptive bitrate streaming,所謂 adaptive bitrate streaming 是透過檢測用戶端的頻寬狀況和 CPU 使用率,動態調整影音畫質的播放技術。而欲將串流傳送到支援不同協定的各種不同裝置上,則可以透過動態封裝 ( dynamic packaging ) 的技術重新封裝編碼後影片內容。

adaptive bitrate streaming 的運作原理是透過將視訊編碼成不同解析度 ( resolutions ) 和位元率的視訊串流,並且使它們保持同步的狀態。過去在轉播即時事件時,需要將處理即時視訊編碼時所造成的延遲 ( Latency ) 控制在可以接受的範圍。因此在硬體的需求,可能需要效能較好的 CPU,甚至必須採用編碼效率更高的 GPU 設備。此外若是您的服務需要建立多個影音串流,會需要更大的頻寬( bandwidth ) 來將這些串流送到 CDN,再透過這些 CDN 將影片內容廣播給世界各地的用戶。上述所說的所有事情,都意味著您在建立基礎建設時的成本會相當的昂貴。

在 Azure Media Services 提供的即時編碼 ( Live Encoding ) 服務是解決上述問題的雲端方案,運用這項新功能,您只需要將單一 ( 最高畫質 ) 的影音傳送到 Microsoft Azure 的資料中心,之後即時編碼服務會開始進行運算工作,並且將其編碼成多種畫質解析度之 adaptive bitrate stream。這意味著您只需要擁有一個良好的網路環境,並且在相機或是攝影裝置上備有一個編碼器,您就能夠轉播一個即時的事件,並且這項服務具備延展性 ( scalable ),也因此只需要負擔您使用時所產生的費用。

 

如何使用即時編碼 ( Live Encoding )

透過以下步驟來設置即時編碼,並且轉播即時事件。

1. 決定您要使用何種協定來將即時影片串流即時餵入 ( live feed ) Microsoft Azure Media Services ( 詳情請參考下文 )

2. 使用 Azure API 或是 Azure 入口網站建立一個即時的通道 ( Channel ),並且設定您的即時編碼

3. 設定本地編碼器 ( on-premises encoder ) 傳送一個單一且最高品質 ( high quality ) 的影片餵入 Microsoft Azure Media Services

4. 透過 Azure 入口網站來預覽輸出串流

5. 建立一個 Program 來管理您的轉播事件

注意: 在後續將有文章詳述上述步驟與設定方式。

 

支援的格式以及解編碼器 ( codecs )

即時編碼所支援的輸入協定有 : RTMP、RTP ( MPEG TS )、Smooth Streaming。您能夠傳送的視訊編碼格式是 MPEG-2 或是 H.264,而音訊則是 AAC-LC ( 最多7.1 聲道 )、 Dolby® Digital/AC-3 ( 最多7.1 聲道 )、 MPEG Audio ( 最多到立體聲 )。

即時編碼支援的色度抽樣 ( chroma subsampling ) 是從 4:2:2 到 4:2:0。而在輸出部分,即時編碼能將視訊編碼至 H.264 ( 最多逐行高達4:2:0 ) 而音訊則是立體聲或是單聲道 AAC ( LC, HE v1, HE v2 Profile )。若視訊饋送中有的話,即時編碼還支援 EIA/CEA-708 closed captions。為了發送廣告提示,即時編碼支援透過API呼叫的輸入資訊,若是輸入協定是RTP的話,則能夠支援 SCTE-35 SpliceInsert 以及 TimeSignal 指令。在輸出端我們的服務能夠送出 HLS Playlist Tags ( SCTE-67 )、 Smooth Streaming Sparse Tracks ( SCTE-35 ) 、HDS CueInfo Elements 等格式。

 

選擇嵌入協定 ( ingest protocol )

 

  • RTMP : 最常見的嵌入協定之一,它能夠透過內建編碼器的攝影器材或第三方廠商的編碼器 ( 例如 : Telestream Wirecast、Flash Media Live Encoder, Tricaster 等 ) 將影片餵入 ( input feed ) 透過一般網際網路傳送至微軟的 Azure 資料中心。
  • RTP : 許多專業媒體廠商像是 Elemental Technologies、Ericsson, Ateme、Envivio 等支援此協定,使用本地端的即時編碼器,並且透過專線網路做影片傳送 ( 例如 : Microsoft Azure ExpressRoute )
  • 使用 HTTP 的 Smooth Streaming : 通常用於專業媒體廠商 ( Elemental Technologies、Ericsson, Ateme、Envivio ) 之設備支援此協定,並透過一般網際網路將影片串流傳送至微軟的 Azure 資料中心。

 

使用 RTMP 的注意事項

當將一個即時影片透過 RTMP 協定傳送至 Azure Media Services 通道 ( Channel ) 中,有以下的限制 :

1. 視訊編碼為 H.264,解析度則可高達 1080p,而立體聲道編碼為 AAC-LC。

2. 音訊採樣率 ( Audio sampling rate ) 為 44.1kHZ。

3. 推薦的編碼模式為封閉的 GOP 和 CBR。

4. 所需傳送的網路頻寬 ( bandwidth ) 需要超過視訊與音訊位元率 ( bitrate ) 的總和。

 

使用 RTP 的注意事項

如果您計畫使用 RTP 協定來傳送即時串流至 Azure Media Services ,您需要注意網路連接的狀態需要如下所示 :

1. 具備高流量 ( High throughput ) 網路頻寬,頻寬位元率須高於輸入串流的 1.5倍。當您在進行轉播活動時,需要較高的頻寬來進行傳輸,因此可以選擇流量彈性較高的網路,藉此來降低成本。

2. 低延遲 ( Low latency ) 網路傳輸環境,需低於150毫秒。

3. 具備網路品質服務水準保證 ( SLA on QoS ) 與可用性 ( availability ) 之網路環境。

上述兩種作法在一線大型網路提供商皆可提供。符合條件之網路提供商列表

 

RTP 透過 Border Gateway Protocol  (BGP) 網路互連 ( peering ) 傳輸影片

您可以使用 RTP 通過公用網路以及 BGP 協定,讓您的資料中心與 Microsoft Azure 網路環境進行互連。在這種情況下,可由單一或多個網路提供商為影片直播提供高速 IP (HSIP) 之網路傳輸環境。影片資料傳輸透過公用網際網路時,而網路供應商之 IP Edge 可與Microsoft Azure 網路相互連接於一共同位置 (co-location)。而這些網路環境互聯相關資訊可以透過 PeeringDB 查詢得知。

網路供應商負責將影片資料傳送到 Microsoft Azure,亦可以訂定符合客戶需求之服務水準合約 (SLAs)。這個做法近來被使用在轉播 NBC 運動賽事和冬季索契奧運會,也有效的降低了網路的成本。

 

RTP 透過專用 ( dedicated ) 與私人 ( private ) 網路傳輸影片

您可以使用一般針對通用的資料傳輸用途所設計的專用/私人網路來傳輸影片,而非使用專為影片傳輸所設計的網路環境來傳送,通常這種情況都是由網路供應商套裝服務所提供,這種服務的優點在點對點影片傳送時能夠帶來管理與服務品質上的優勢。這種服務主要分成兩種類型 :

1. Microsoft Azure ExpressRoute 通過網路服務供應商 ( NSP ) 或是介接提供商 ( Exchange Provider )

例如 : Azure ExpressRoute + Level 3 Cloud Connect Solutions 或是 Azure ExpressRoute + Equinix Cloud Exchange

2. 由網路供應商管理影音之服務

例如 : Level 3 VYVX Solution

若您正在透過 RTP 發送一個及時饋送 ( Live feed ),在傳送中常見的編碼協議如下所示 :

  • 編碼 : H264/AAC
  • Container格式 : MPEG-2 TS
  • 網路協定 --- 應用層 ( Application Layer ) : RTP
  • 網路協定 --- 傳輸層 ( Transport Layer ) : UDP

 

發送廣告信號 ( signaling advertisements )

當您 Azure Media Service 的通道 ( Channel ) 已經啟用了即時編碼功能,您能夠透過一些組件來處理影片資料,並且進一步操控資料。在 Azure Media Service 的服務中,您可以透過通道來插入開拍板 ( Slates ) 和廣告訊號 ( Advertising signals ) 至欲輸出的 adaptive bitrate streaming 中。廣告訊號是一個時間同步 ( time-synchronized ) 的信號,您能夠將它內嵌到輸出串流,並且告知影片撥放器去執行特定的動作,例如在適當的時間點切換至廣告。您可以參考這篇部落格,裡面介紹了 SCTE-35 訊號機制。以下是您能夠在您轉播即時事件時可以控制之動作 (範例程式和 API 細節會在日後的文章有詳細介紹 )。

  • 讓您的觀眾在事件撥放前 ( PRE-EVENT ) 獲得一個 PRE-EVENT 圖像
  • 在事件撥放結束之後,獲得一個 POST-EVENT 圖像
  • 在您的事件撥放期間,發生錯誤時,得到一個 ERROR-EVENT 圖像 ( 例如 : 球場停電 )
  • 當中場廣告的時候出現一個 AD-BREAK 圖像。

 

得到一個即時輸輸入影片之縮圖瀏覽 ( thumbnail preview )

當即時編碼已經啟用,而且即時將影片餵入到 Azure Media Services 通道 ( Channel ) 之後,您可以藉由縮圖瀏覽來確認影片是否真的已經送達通道了,此縮圖功能 Azure Media Service 亦提供 API 可供開發人員呼叫。

總結

在這篇文章中,我們介紹了 Microsoft Azure Media Service 的即時編碼 ( Live Encoding ) 功能。在接下來的幾天,會有更多介紹關於如何使用 Azure 入口網站建立即時編碼、如何由本地端編碼器來將影片即時餵入 ( input live feed ) Azure Media Services 通道 ( Channel )、如何控制廣告訊號發送。若您還有其他關於即時編碼的問題,請透過此電子郵件信箱與我們聯繫 amslived@microsoft.com

Lifecycle services Crash and hang analysis

MSDN Blogs - Fri, 04/24/2015 - 21:53

Are you wondering how to use the new beta feature we just shipped called Lifecycle services Crash and hang analysis?

This blog will help you get started:

http://blogs.msdn.com/b/axsupport/archive/2015/03/23/crash-and-hang-analysis-on-lcs.aspx

 

Sincerely,

The Lifecycle Services Team

Pages

Subscribe to Randy Riness @ SPSCC aggregator
Drupal 7 Appliance - Powered by TurnKey Linux