Quantcast
Channel: TechNet Technology News
Viewing all 13502 articles
Browse latest View live

Technical Preview: Database Experimentation Assistant

$
0
0

This post is authored by Christina Lee, Program Manager – Data Group SEALS Team

Overview

Database Experimentation Assistant (DEA) is a new A/B testing solution for SQL Server upgrades. It will assist in evaluating a targeted version of SQL for a given workload. Customers upgrading from previous SQL server versions (starting 2005 and above) to any new version of the SQL server can use these analysis metrics provided by tool, such as queries that have compatibility errors, degraded queries, query plans, and other workload comparison data to build higher confidence and have a successful upgrade experience.

What Can I Do?

DEA offers the following capabilities for workload comparison analysis and reporting:

  • Set up automated workload capture and replay of production database (using existing SQL server functionality Distributed Replay & SQL tracing)
  • Perform statistical analysis on traces collected using both old and new instances
  • Visualize data through analysis report via rich user experience

With DEA, you can:

  • Capture Trace: you can automatically capture a production workload trace with only a few inputs. Learn how to capture trace.
  • Replay Trace: you can replay a trace on current and new/proposed instances of SQL. Learn how to replay trace.
  • View Workload Analysis Reports: you can generate new reports to gain insights on how workload performance changes across versions of SQL. In addition to generating a new report, you can view previously generated reports. Learn how to generate reports.

DEA can be used through command line: learn how to use DEA command line.

Supported versions

Source: SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, and SQL Server 2016
Target: SQL Server 2012, SQL Server 2014, and SQL Server 2016

Installation

You can install from Microsoft Download Center. Run ‘DatabaseExperimentationAssistant.msi’ to install Database Experimentation Assistant.

Questions/Feedback

For questions, please visit the FAQs for DEA. If you have further questions or would like to provide feedback, please email us at deafeedback@microsoft.com.


Six ways Cortana and Microsoft Edge make holiday shopping easier

$
0
0

Cortana can help you save money with coupons

Cortana can help you save money with coupons

Enabling Cortana on your Windows 10 device also enables Cortana to help you in Microsoft Edge. With Cortana in Microsoft Edge, Cortana can alert you with deals and coupons for the sites you’re shopping like Best Buy, Macy’s and Kohl’s so you can be assured you’re getting the best deal*!

Cortana can help you search with images

Cortana can help you search with images

Whether you’re browsing for an image on Microsoft Edge or you see an image on your favorite website, Cortana can help you find similar images, details on price and where to buy what you see in the image. Simply right-click the image and select “Ask Cortana”. This is especially handy if something you wanted to purchase was sold out, or you want to purchase something you saw in an image search.

Ask Cortana to remind you of sales when browsing in Microsoft Edge

Ask Cortana to remind you of sales when browsing in Microsoft Edge

Say you want Cortana to remind you of an upcoming sale, or remind you to check back on your favorite website. Simply select the text on the page you’re browsing, click or touch the Share icon in the top-right corner of Microsoft Edge and select Cortana reminders, Cortana will instantly enable you to create a reminder.

Save gift ideas for later with the Pinterest Save Button

didyouknow_cortanaedgeshopping_blog4

Easily collect photos, recipes or gift ideas that you want to look at later to inspire your shopping list with the Pinterest Save Button extension in Microsoft Edge. Download the extension from the Windows Store for free here.

Get updates on price changes with the Microsoft Personal Shopping Assistant

didyouknow_cortanaedgeshopping_blog6

The Microsoft Personal Shopping Assistant extension for Microsoft Edge will remember the products you browse online automatically, so you can easily come back to them later. You can also save “Favorite” items and get notified when prices change, compare products across sellers and share items you love with others. Download the extension from the Windows Store for free here.

Find the best deals with Amazon Assistant

didyouknow_cortanaedgeshopping_blog5

With the Amazon Assistant extension for Microsoft Edge you can compare prices, get notified about deals and create a universal shopping list across websites. Download the extension from the Windows Store for free here.

Enjoy shopping with Cortana and Microsoft Edge, and happy holidays!

*US-only

Kick-start your business in the new year with Office Small Business Academy

$
0
0

sba-1

Are you ready to be your own boss in 2017? Get ready to kick-start your new business with must-have advice and motivation from our team of experts.

Register now for the next Office Small Business Academy, “New Year Inspiration: Taking the Leap into Entrepreneurship,” airing December 13, 2016 at 9 a.m. PT / 12 p.m. ET. In this episode, get strategies and expert advice for starting your new business in the new year. Plus, learn how to bring your presentations to life in a fraction of the time with PowerPoint Designer and Zoom—the newest additions to PowerPoint.

Watch this preview:

This month’s featured guests include:

  • Ramon Ray, editor of Smart Hustle Magazine, will share the biggest mistakes small business owners should avoid and top tips for turning lofty ideas into a fully-operational reality.
  • Founder and CEO of Stella & Dot Family Brands, Jessica Herrin, will give advice from her book, “Find Your Extraordinary,” including how to achieve success on your own terms.

Sign up for free!

For more information, visit the Office Small Business Academy home page.

Related content

The post Kick-start your business in the new year with Office Small Business Academy appeared first on Office Blogs.

Students launch Windows 10 IoT experiment into space

$
0
0

Students using Windows 10 IoT and Lego Mindstorm create science experiments on board the International Space Station

Valley Christian Schools students and Quest Institute’s Danny Kim prepare for launch

Valley Christian Schools students and Quest Institute’s Danny Kim prepare for launch

With the successful launch of Quest Institute’s first ever Windows 10 IoT based experiment platform onto the International Space Station (ISS) last month, the world of STEM has opened up allowing students—from Elementary to High School—to become true “rocket scientists” and participate in experiments aboard the International Space Station. The need for STEM education continues to grow as the field sees a shortfall of more than 3 million skilled workers in related fields by 2018.

“It’s important to encourage STEM education starting at an early age, and space science is a phenomenal way to get kids excited about STEM fields,” said Steve Guggenheimer, corporate vice president and Microsoft’s chief evangelist. “We are proud to be part of this effort and that Windows 10 is the platform that is helping students reach new heights.”

 Students from Valley Christian Schools in San Jose California on stage with Steve Guggenheimer at Microsoft’s BUILD 2016 conference

Students from Valley Christian Schools in San Jose California on stage with Steve Guggenheimer at Microsoft’s BUILD 2016 conference

Over a year ago, Microsoft and Quest Institute started collaborating together  to solve one of engineering’s most difficult problems with space: make a scalable science platform that can withstand the harshness of space. The joint initiative to create this “NextGen” ISS brought about new innovations through Windows 10 IoT to handle fault tolerance which culminated in the first flight of this new platform. Quest’s NextGen ISS experiment platform flew aboard the Antares OA5 Mission rocket on October 17th and astronauts aboard the ISS were able to successfully connect the experiment platform.

The experiment will test the pliability of metals in space with the goal of better understanding how metals react in space. Students received their first set of live data from the ISS on last week, and are starting to interpret the results to discover how different metals react to catalysts in microgravity. Ultimately, the results will help better understand how to manipulate metals and debris on board the ISS.

Windows 10 IoT made it possible to create a project that not only coordinates and manages multiple student experiments off of one platform, but also connects to servers on earth and is able to transfer data to and from the ISS. This has not only opened up space science experiments to students, but the scale of managing multiple experiments has made this type of program affordable and accessible to more students who are motivated by space science.

Students launch Windows 10 IoT experiment into space

A look inside the NextGen ISS Platform experiment aboard the International Space Station

We are so proud of the work these students have been able to do so far and cannot wait to see them continue to push the boundaries to expand our knowledge of the world as we know it today.

For more information on how you can be involved in the program—from volunteering to signing up your local schools—please visit questforspace.com. You can follow along as the project progresses via @questforspace and #questforspace.

Students Launch Windows 10 IoT Experiment into Space

The week in .NET – .NET Core, ASP.NET Core, EF Core 1.1 – Docker – Xenko

$
0
0

To read last week’s post, see The week in .NET – Mitch Muenster – Stateless.

.NET Core, ASP.NET Core, EF Core 1.1, VS for Mac Preview, VS 2017 RC, SQL Server on Linux, Tizen, Google joins .NET Foundation, and Microsoft becomes a Linux Foundation platinum member

This week, at the Connect(); // 2016 event, we made a number of announcements, including Visual Studio 2017 RC, Visual Studio for Mac Preview, SQL Server on Linux Preview, .NET Core 1.1, Entity Framework Core 1.1, ASP.NET Core 1.1, Samsung adopts .NET in their Tizen OS, Google joins the .NET Foundation, and Microsoft becomes a Linux Foundation platinum member. Check out the announcement posts for all the details.

On .NET

Last week, Michael Friis and Glenn Condron were on the show to talk about Docker and .NET:

This week, we’ll speak with Chad Z. Hower a.k.a. Kudzu to talk about Cosmos, an operating system “construction kit” built with the IL2CPU compiler, C#, and X#, a homebrew language that’s part of the project. This week, because of the Thanksgiving week-end, the show is exceptionally on Wednesday, and begins at 10AM Pacific Time on YouTube. We’ll take questions on the video’s built-in chat.

Package of the week: mahapps.metro

mahapps.metro is a toolkit to build Metro-style WPF applications that’s used by the Xamarin Inspector, Xamarin Workbooks and Markdown Monster.

mahapps.metro

Tool of the Week: Xenko

Xenko is an open-source C# game engine that comes with a full toolchain and development environment.

Xenko Game Studio

Xenko’s new Script Editor Preview brings complete integration of script code in the Game Studio.

User group meeting of the week: Cognitive Services, AI as an API in Burlington, MA

The New England Microsoft Developers group holds a meeting on Thursday, December 1 at 6:30PM in Burlington, MA about Microsoft Cognitive Services and how they give easy access to sentiment analysis, speech recognition, picture and video tagging, search, spell check, and more.

.NET

ASP.NET

F#

New F# language proposals:

Check out F# Weekly for more great content from the F# community.

Xamarin

Azure

Games

And this is it for this week!

Contribute to the week in .NET

As always, this weekly post couldn’t exist without community contributions, and I’d like to thank all those who sent links and tips. The F# section is provided by Phillip Carter, the gaming section by Stacey Haffner, and the Xamarin section by Dan Rigby.

You can participate too. Did you write a great blog post, or just read one? Do you want everyone to know about an amazing new contribution or a useful library? Did you make or play a great game built on .NET?
We’d love to hear from you, and feature your contributions on future posts:

This week’s post (and future posts) also contains news I first read on The ASP.NET Community Standup, on Weekly Xamarin, on F# weekly, and on Chris Alcock’s The Morning Brew.

Everspace launches on Xbox One and Windows 10

$
0
0

Our team at Rockfish Games has been working together on space shooters for over ten years now, on everything from smartphones, tablets, PC and, most recently, consoles. Which is why we couldn’t be more excited about the launch of Everspace on Xbox One, our very first console game that supports Xbox Play Anywhere featuring cross-saves and the ability to buy once and play anywhere with Windows 10!

Everspace

Everspace is a Six Degrees of Freedom (6DoF) shooter featuring fast-paced space dogfights within dense level design at its core. You’ll have to survive in a hostile environment filled with natural hazards, as well as various enemies like outlaws, aliens, and a mysterious space armada trying to hunt you down. It’s not only about shooting enemies – evading enemy fire is paramount to survival as well. Get Eversapce from the Windows Store here, check out developer tips and strategies on playing Everspace over at Xbox Wire and head over to the Everspace forum to learn from veteran pilots who have clocked more than 100 hours in our game.

Windows 10 PCs get Xbox One game streaming with Oculus Rift on Dec. 12

$
0
0

Today marks an evolution in our ongoing partnership with Oculus, as Rift owners will be able to stream their Xbox One library to Rift with the new Xbox One Streaming to Oculus Rift app, available for free in the Oculus Store on Dec. 12.

Windows 10 PCs get Xbox One game streaming with Oculus Rift on Dec. 12

The new Xbox One Streaming to Oculus Rift app connects to your Xbox One via your home network. Once connected, your console’s video output is streamed to your Rift headset and projected onto a massive screen in your choice of one of three immersive VR environments: “Citadel,” “Retreat” and “Dome.”

Windows 10 is the best platform for playing games on Oculus Rift

Rift works natively with Windows 10, which makes it easy to set up, jump in and have an incredible VR gaming experience. Combined with DirectX 12 technology that unlocks the full capabilities of new Windows 10 graphics hardware, made-for-VR games on Windows 10 will have the fastest frame rates and top performance.

We’ve also teamed up with Oculus to offer an Xbox Wireless Controller included with every Rift. In addition, with the Xbox Wireless Adapter and new PCs with native Xbox Wireless support, you can play games on Rift using your controller wirelessly right out of the box.

Head over to Xbox Wire to learn more!

Windows Ink 2: Digging Deeper with Ink and Pen

$
0
0

In the last post, we explored a brief history of pen computing and introduced you to how easy it is to get started with Windows Ink in your Universal Windows Platform app. You saw that you can enable inking by adding a single line of code, an InkCanvas, to your app to enable inking. You also saw that adding another single line of code, the InkToolbar, gives the user additional pen-related tools like pen-stroke color and stroke type.

In this post, we’ll dig deeper into how we can further customize the pen and ink experience to make your application a delightful inking experience for the user. Let’s build a Coloring Book application!

Customizing The Inking Experience

Getting Started

To get started, let’s put in an InkCanvas on the page:

By default, the InkCanvas’s input is set to only accept strokes from a Pen. However, we can change that by setting the InputDeviceTypes property of the InkCanvas’s InkPresenter. In the page constructor, we want to configure the InkCanvas so that it works for pen, mouse and touch:


myInkCanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Pen 
                | Windows.UI.Core.CoreInputDeviceTypes.Mouse 
                | Windows.UI.Core.CoreInputDeviceTypes.Touch;

As we did in the last article, we’ll add an InkToolbar and bind it to myInkCanvas, but this time we’re going to put it within a CommandBar. This is so we can keep it next the other buttons that we’ll add later, like Save and Share.

Note: If you see a XAML designer error when you add the InkToolbar, you can safely ignore this as it is a known issue that is being worked on. Your code will run fine.

However, this time, we also want to provide the user with some additional InkToolbar options. We have two main ways to do this using the InkToolbar, we can use a

  • Built-in InkToolbar pen button
  • Custom InkToolbar pen button

Built-in InkToolbar pens

Let’s start with an example of a built-in option, the InkToolbarBallPointPenButton. This is an ‘out-of-the-box’ InkToolbar button that, when selected in the InkToolbar, activates the BallPointPen. To add this, you place it within the InkToolbar’s content, like so:

If you ran the app now, your InkToolbar would look like this:

picture1

Custom InkToolbar Pens

Creating a custom pen is rather straightforward and requires very little code. Let’s start with the basic requirement: We need to create a class that inherits from InkToolbarCustomPen and give it some attributes that define how it will draw.  Let’s take this step by step and make a custom highlighter marker.

First, let’s add a new class to your project.  Name ithe class “MarkerPen,” add the following using statements and inherit from InkToolbarCustomPen:


using Windows.UI;
using Windows.UI.Input.Inking;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;

class MarkerPen : InkToolbarCustomPen
{
}

In this class, we only need to override the CreateInkDrawingAttributesCore method. Add the following method to the class now:


protected override InkDrawingAttributes CreateInkDrawingAttributesCore(Brush brush, double strokeWidth)
{
}

Within that method we can start setting some drawing attributes. This is done by making an instance of InkDrawingAttributes and setting some properties. Here are the attributes I’d like the pen to have:

  • Act like a highlighter
  • Has a round pen tip shape
  • Has a red stroke color as the default color
  • Be twice as thick as the user’s stroke

Here’s how we can fulfill those requirements:


InkDrawingAttributes inkDrawingAttributes = new InkDrawingAttributes();

// Set the PenTip (can also be a rectangle)
inkDrawingAttributes.PenTip = PenTipShape.Circle;

// Set the default color to Red 
SolidColorBrush solidColorBrush = brush as SolidColorBrush;
inkDrawingAttributes.Color = solidColorBrush?.Color ?? Colors.Red;

// Make sure it draws as a highlighter
inkDrawingAttributes.DrawAsHighlighter = true;

// Set the brush stroke
inkDrawingAttributes.Size = new Windows.Foundation.Size(strokeWidth * 2, strokeWidth * 2);

return inkDrawingAttributes;

That’s it, your custom pen is done. Here’s the completed class:


using Windows.UI;
using Windows.UI.Input.Inking;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media;

class MarkerPen : InkToolbarCustomPen
{
        protected override InkDrawingAttributes CreateInkDrawingAttributesCore(Brush brush, double strokeWidth)
        {
            InkDrawingAttributes inkDrawingAttributes = new InkDrawingAttributes();
            inkDrawingAttributes.PenTip = PenTipShape.Circle;
            SolidColorBrush solidColorBrush = brush as SolidColorBrush;
            inkDrawingAttributes.Color = solidColorBrush?.Color ?? Colors.Red;
            inkDrawingAttributes.DrawAsHighlighter = true;
            inkDrawingAttributes.Size = new Windows.Foundation.Size(strokeWidth * 2, strokeWidth * 2);
            return inkDrawingAttributes;
        }
}

Now, let’s go back to the page where you have your InkToolbar and InkCanvas. We want to create Resources section for your page that contains a StaticResource instance of the custom pen. So, just above the root Grid element, add the following Resources code:


...

A quick note about XAML Resources: The page’s resources list is a key/value dictionary of objects that you can reference using the resource’s key. We’ve created an instance of our MarkerPen class, local:MarkerPen, and given it a key value of “MarkerPen” (if you want to learn more about XAML resources, see here).

We can now use that key in a InkToolbarCustomPenButton’s CustomPen property. This is better explained by the code. Let’s break it down:

In your InkToolbar, add an InkToolbarCustomPen and give it a name:

The InkToolbarCustomPen has a CustomPen property:

We can now set that CustomPen property using the key of our resource:

Now, let’s set the SymbolIcon for the button:

Next, let’s add an InkToolbarPenConfigurationControl:

Let’s take a look at what the InkToolbarPenConfigurationControl does for you. Even with a custom implementation of a pen, you still get to use the out-of-the-box Windows Ink components. If the user clicks on your pen after it’s selected, they’ll get a fly-out containing options to change the color and the size of the pen!

However, there’s one little tweak we want to make. By default, you get Black and White as the only colors in the flyout:

picture1

We want a lot of colors, and fortunately, the BallpointPenButton you added earlier has a palette full of colors. We can just use that same palette for our custom pen by binding to it:

Now, here’s what the pen configuration control looks after binding the Palette:

picture3

Whew, okay, the toolbar is coming along nicely! Here’s what we have so far for our CommandBar:

Now, let’s start adding some commands.

Custom InkToolbar Tool Buttons

The first thing you’d really want in a drawing application is the ability to undo something. To do this we’ll want to add another button to the toolbar; this is easily done using an InkToolbarCustomToolButton. If you’re familiar with adding buttons to a CommandBar, you’ll feel right at home.

In your InkToolbar, add an InkToolbarCustomToolButton and give it a name, “undoButton.”


...

The button has your familiar button properties, such as a Click event and supporting a SymbolIcon for content, so let’s add those as well.

Here’s what your XAML should look like:


...

Now, let’s go to the button’s click event handler.  Here we can do the following to undo strokes that were applied to the InkPresenter, here are the steps:

First, make sure you add the following using statement to the code-behind:


using Windows.UI.Input.Inking;

Then get all the strokes in the InkPresenter’s StrokeContainer:


IReadOnlyList strokes = myInkCanvas.InkPresenter.StrokeContainer.GetStrokes();

Next, verify that there are strokes to undo before proceeding:


if (strokes.Count > 0)

If there are strokes, select the last one in the container:


strokes[strokes.Count - 1].Selected = true;

Finally, delete that selected stroke using DeleteSelected():


myInkCanvas.InkPresenter.StrokeContainer.DeleteSelected();

As you can see, it’s pretty easy to get access to the strokes that were made by the user and just as easy to remove a stroke. Here is the complete event handler:


private void Undo_Click(object sender, RoutedEventArgs e)
{
    // We can get a list of the strokes that are in the InkPresenter
    IReadOnlyList strokes = myInkCanvas.InkPresenter.StrokeContainer.GetStrokes();

    // Make sure there are strokes to undo
    if (strokes.Count > 0)
    {
       // select the last stroke
       strokes[strokes.Count - 1].Selected = true;

       // Finally, delete the stroke
       myInkCanvas.InkPresenter.StrokeContainer.DeleteSelected();
    }
}

Final InkCanvas configuration

Before we conclude the drawing logic, we need to make sure the page loads with some InkDrawingAttributes presets and InkPresenter configuration. To do this, we can hook into the InkCanvas’s Loaded event.

We can do this in the XAML:

The attributes are set in a similar way that we set them for the custom pen, instantiate an InkDrawingAttributes object and set some properties. However, this time, we’re passing those attributes to the InkPresenter.

Additionally, a few other things thing should be addressed:

  • Give the custom pen the same color palette as the ballpoint pen
  • Set the initial active tool
  • Make sure that users can also use the mouse

Here’s the code for the InkCanvas’s Loaded event handler:


private void InkToolbar_Loaded(object sender, RoutedEventArgs e)
{
   // Create an instance of InkDrawingAttributes
    InkDrawingAttributes drawingAttributes = new InkDrawingAttributes();

    // We want the pen pressure to be applied to the user's stroke
    drawingAttributes.IgnorePressure = false;

    // This will set it to that the ink stroke will use a Bezier curve instead of a collection of straight line segments
    drawingAttributes.FitToCurve = true;

    // Update the InkPresenter with the attributes
    myInkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttributes);

    // Set the initial active tool to our custom pen
    myInkToolbar.ActiveTool = markerButton;

    // Finally, make sure that the InkCanvas will work for a pen, mouse and touch
    myInkCanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Pen 
                | Windows.UI.Core.CoreInputDeviceTypes.Mouse 
                | Windows.UI.Core.CoreInputDeviceTypes.Touch;
}

Saving, Sharing and Loading

Now that you’ve got a decent working area, we want to be able to save, load and share the user’s work. In the last post, we showed a simple way to save and load the canvas. However, in our Coloring Book app, we want to have the image and the ink data saved separately so that we can easily share the image for display and sharing purposes, but save, load and edit inking data as well.

Saving Ink Data

As we did in the last post, you can save the ink strokes to a file using the StrokeContainer’s SaveAsync method. What we’ll do differently here is right after we’ve saved the ink file, we’ll also save a parallel image file in the cache. Although we’re able to embed the stroke data into the gif we saved, having a temporary image stored in the cache makes sharing and displaying the image in the app more convenient.

So, at the end of your save button’s click handler, you want to create a new (or get an existing) StorageFile for the image:


// Save inked image.
StorageFile myInkedImageFile = await folder.CreateFileAsync(Constants.inkedImageFile, CreationCollisionOption.ReplaceExisting);
await Save_InkedImagetoFile(myInkedImageFile);

Next, we pass the myInkedImageFile StorageFile reference to the Save_InkedImageToFile method, which saves the image to the file:


private async Task Save_InkedImagetoFile(StorageFile saveFile)
{
    if (saveFile != null)
    {
…
        using (var outStream = await saveFile.OpenAsync(FileAccessMode.ReadWrite))
        {
            await Save_InkedImageToStream(outStream);
        }
…
     }
}

And finally, we get that bitmap from the canvas into the file in the Save_InkedImageToStream method; this is where we leverage Win2D to get a great looking bitmap from the canvas:


private async Task Save_InkedImageToStream(IRandomAccessStream stream)
{
    var file = await StorageFile.GetFileFromApplicationUriAsync(((BitmapImage)myImage.Source).UriSource);

    CanvasDevice device = CanvasDevice.GetSharedDevice();

    var image = await CanvasBitmap.LoadAsync(device, file.Path);

    using (var renderTarget = new CanvasRenderTarget(device, (int)myInkCanvas.ActualWidth, (int)myInkCanvas.ActualHeight, image.Dpi))
    {
        using (CanvasDrawingSession ds = renderTarget.CreateDrawingSession())
        {
            ds.Clear(Colors.White); 
            ds.DrawImage(image, new Rect(0, 0, (int)myInkCanvas.ActualWidth, (int)myInkCanvas.ActualHeight));
            ds.DrawInk(myInkCanvas.InkPresenter.StrokeContainer.GetStrokes());
         }

         await renderTarget.SaveAsync(stream, CanvasBitmapFileFormat.Png);
    }
}

You might ask, why is there a separate method for getting the stream instead of doing it in one place? The first reason is that we want to be a responsible developer and make sure our method names define what action the methods perform. But more importantly, we want to reuse this method later to share the user’s art. With a stream, it’s not only easier to share, you can even send the image to a printer.

Sharing the result

Now that the image is saved, we can share it. The approach here is the same as other UWP sharing scenarios. You want to use the DataTransferManager; you can find many example of how to use this here in the Official UWP samples on GitHub.

For the purposes of this article, we’ll focus only on the DataTransferManager’s DataRequested method. You can see the full sharing code for this here in the Coloring Book demo on GitHub). This is where the Save_InkedImageToStream method gets to be reused!


private async void DataRequested(DataTransferManager sender, DataRequestedEventArgs e)
{
    DataRequest request = e.Request;
    DataRequestDeferral deferral = request.GetDeferral();
    request.Data.Properties.Title = "A Coloring Page";
    request.Data.Properties.ApplicationName = "Coloring Book";
    request.Data.Properties.Description = "A coloring page sent from my Coloring Book app!";
    using (InMemoryRandomAccessStream inMemoryStream = new InMemoryRandomAccessStream())
    {
        await Save_InkedImageToStream(inMemoryStream);
         request.Data.SetBitmap(RandomAccessStreamReference.CreateFromStream(inMemoryStream));
    }
            deferral.Complete();
}

Loading Ink Data from a file

In our Coloring Book app, we want the user to continue working on previous drawings as if they never stopped. We’re able to save the ink file and capture and save the image of the work, but we also need to load the ink data properly.

In the last post we covered how to load up the stroke from the file; let’s review this now.


// Get a reference to the file that contains the inking stroke data
StorageFile inkFile = await folder.GetFileAsync(Constants.inkFile);

if (inkFile != null)
{
    IRandomAccessStream stream = await inkFile.OpenAsync(Windows.Storage.FileAccessMode.Read);

    using (var inputStream = stream.GetInputStreamAt(0))
    {
        // Load the strokes back into the StrokeContainer
        await myInkCanvas.InkPresenter.StrokeContainer.LoadAsync(stream);
    }

    stream.Dispose();
}

That’s all there is to loading sketch’s ink data. All the strokes, and the ink’s attributes, will be loaded into the InkCanvas and the user can continue working on his or her creation.

In the next post, we’ll look at some other real-world applications of Windows Ink and how inking can empower educational and enterprise applications. We’ll also take a look at some of the new hardware and APIs available that make using Windows Ink a go-to item for design professionals.

Resources


Windows at Microsoft Connect(); // 2016

$
0
0

During the Connect(); // 2016, the Windows team talked about the Universal Windows Platform and about some of the great tooling improvements that have happened in recent months.

Kevin Gallo, VP and Program Manager Director of the Windows Platform team, was joined by Mazhar Mohammed and Dave Alles for an hour-long panel discussion and Q&A on Channel 9. Mazhar is the Director of Partner Services of for the Windows Store team, and Dave is the Group Program Manager for the team that created the Maps app for Windows.

Check out the video below to see the interesting conversation between leaders of the teams that create the Windows Platform and the Store, and one of the teams that uses both in creating a major Windows app. Kevin talks about why developers should target UWP, while Mazhar discusses the constant improvements in the Store and Dev Center. Dave talks about what a 1st-party app thinks about new features, and interacts with the platform team to provide feedback and request functionality. This is actually very similar to the way external developers provide input and feedback via UserVoice!

In the keynote, Stacey Doerr joined Scott Hanselman on stage to talk about automated UI testing of Windows apps using WinAppDriver and Appium. This isn’t just for testing UWP apps, but all Windows applications, including applications built in VB6 or Delphi and more. For more details about WinAppDriver, check out Yosef’s in-depth blog post: Windows Application Driver for PC integrates with Appium. Scott also has a great overview on getting started tested on Windows with Appium.

The Windows teams also did the following four presentations to provide deeper dives into the Desktop Bridge and a set of new and improved developer tooling capabilities:

Power BI Webinar 11/29 How the Microsoft BI Team manages Power BI

$
0
0
Learn how the Microsoft BI team will deliver a webinar on how they support the self service BI initiative at Microsoft. November 29, 2016 10:00 - 11:00 AM https://info.microsoft.com/US-PowerBI-WBNR-FY17-11Nov-29-BIATMIcrosoft274828_01Registration-ForminBody.html

New pricing model for encoding with Azure Media Services coming in January 2017

$
0
0

Based on customer demand and feedback, starting January 1, 2017, we will implement a new pricing model for on-demand encoding of media with Azure Media Services. For the Standard Encoder and Premium Encoder, we will be calculating usage based on the total duration of the media files produced as output by the encoder. Further, for Media Reserved Units, we are lowering the rate, and making a change to calculate usage on a per-minute basis. In this post, I’ll be walking you through some examples to show how the new pricing models work.

New per-output-minute model for encoding

Starting on January 1, 2017, we will bill for encoding jobs based on the duration of the media files produced as output by the encoder. No code changes are needed in your application, as the new model will be automatically applied by our service.  Please refer to the official pricing page after January 1, 2017, in order to verify the final price for each data center.

Calculation of output minutes

To calculate the total output minutes for an encoding task, we make use of the following multipliers:

Multipliers for calculating output minutes
QualityMultiplierExample
Audio only output0.25x20 minutes of audio count as 5 SD minutes
SD (less than 1280×720)1x

20 minutes

HD (1280×720 - 1920x1080)2x20 minutes of HD output count as 40 SD minutes
UHD (up to 4096x2160)4x20 minutes of UHD output count as 80 SD minutes

 

 

 

 

 

 

Pricing example for Standard Encoder

The Standard Encoder is the best option if your goal is to transcode a wide variety of input video/audio files into an output format suitable for playing back on a variety of devices (smartphones, tablets, PCs, consoles, TVs). You can read more about the capabilities of this (Media Encoder Standard) media processor in our documentation.

To determine the overall cost for using this encoder, you need to know the duration of your input video and its resolution, and the encoding preset. Suppose you have a high-quality QuickTime video at 1920x1080p resolution, which is 20 minutes in duration. If you want to encode this 1080p input for delivery via adaptive streaming protocol to a variety of devices, then you would typically use a preset such as the “H264 Multiple Bitrate 1080p.” Using such a preset will incur billing for each output layer/bitrate, along with a multiplier depending on the video resolution. For this preset, the following multipliers apply:

LayerResolutionMultiplier
HD Video 11920x10802x
HD Video 21920x10802x
HD Video 31280x7202x
SD Video 1960x5401x
SD Video 2960x5401x
SD Video 3640x3601x
SD Video 4640x3601x
SD Video 5320x1801x
AudioN/A0.25x
Total 11.25x

Based on the table above, your encoding of the QuickTime video will result in a total of 11.25 * 20 = 225 output minutes. After January 1, 2017, you can refer to the official pricing page for the current rates for one output minute, applicable to your data center, and multiply that by 225 to determine the final cost.

Pricing example for Premium Encoder

If your objective is to transcode between formats common to the broadcast or movie industry, or if your video workflow requires complex logic, then you would need the Premium Encoder. See our documentation for an in-depth comparison of the feature differences between the two encoders. Additionally, this blog offers a flow chart to help choose between the two encoders. Suppose you have a high quality ProRes/QuickTime video that is 20 minutes in duration, with 1920x1080p video resolution but two audio tracks – one in English and the other in Spanish. You can use the Premium Encoder to transcode this video into a single bitrate MXF file, with one video track and two audio tracks. In this case, the multiplier would be 2 (for HD video) plus 2*0.25 (for each audio) adding up to 2.5. Thus, your encoding of the QuickTime video into an MXF file would result in a total of 20*2.5 = 50 output minutes. After January 1, 2017, you can refer to the official pricing page for the current rates for one output minute, applicable to your data center, and multiply that by 50 to determine the final cost.

Per-hour pricing for Media Reserved Units

You need to add Media Reserved Units (MRUs) to your Media Service account if your workload requires one or more videos to be processed concurrently. You can increase the overall throughput from the service by (a) increasing number of MRUs to get more videos processed concurrently, and (b) by using faster MRUs (eg. S3). See the documentation for more information. Based on customer demand and feedback, we are changing the pricing model for MRUs to more closely track the actual usage of such units. As of January 1, 2017, you will be charged based on the time each MRU is active in your accounted, pro-rated on a per-minute basis.

Example of MRU Pricing

Here is an example, that shows that your charges will be based on actual minutes of usage of MRUs. Suppose you had zero MRU to begin with, and at 10:00 am on a particular day, you set your account to use 2 S1 MRUs. More videos arrive in the afternoon, so you change your account to use 4 S3 RUs at 1:15 pm. All the videos are processed by 4:00 pm, and then you turn off the MRUs in his account (set number of MRUs to zero). Your usage, for that day, is calculated as follows.

  • S1 Media Reserved Units: 2 units * 3.25 hours (10AM to 1:15PM)  = 7.5 S1 hours
  • S3 Media Reserved Units: 4 units * 2.75 hours (1:15PM to 4PM)  = 11 S3 hours

After January 1, 2017, you can refer to the official pricing page for the current rates for one S1 hour, and one S3 hour, and multiply them by 7.5 and 11 respectively, and add the results to get the total cost.

Contact us

Keep monitoring the Azure Media Services blog for updates on encoding capabilities.

Send your feedback and feature requests to our UserVoice page.

Released: Public Preview for System Center Management Packs for SQL Server

$
0
0

We are getting ready to update the SQL Server Management Packs family. Please install and use this public preview and send us your feedback (sqlmpsfeedback@microsoft.com)! We appreciate the time and effort you spend on these previews which make the final product so much better.

Please download at:

Microsoft System Center Management Packs (Community Technical Preview 1) for SQL Server

Included in the download are:

  • Microsoft System Center Management Pack for SQL Server 2008/2008 R2/2012/2014/2016 (6.7.10.0)
  • Microsoft System Center Management Pack for SQL Server Replication 2008/2012/2014/2016 (6.7.10.0)
  • Microsoft System Center Management Pack for SQL Server Analysis Services 2008/2012/2014/2016 (6.7.10.0)
  • Microsoft System Center Management Pack for SQL Server Reporting Services 2008/2012/2014/2016 (6.7.10.0)
  • Microsoft System Center Management Pack for SQL Server Dashboards (6.7.10.0)

New SQL Server 2008/2008 R2/2012 MP Features and Fixes

  • No extra permissions on remote WMI are now required for Local System account when Always On hosts have names that are no longer than 15 symbols
  • Fixed: Always On discovery and monitoring scripts cannot read cashed values in Windows registry
  • Fixed: Wrong MP version number in some Always On scripts
  • Fixed: CPUUsage and DBDiskLatency scripts fail with the reason: “Index operation failed”
  • Added retry policy in some Always On workflows to make PS-scripts work more stable
  • Updated the visualization library
  • Changed behavior of Always On scripts for cases when WSFC service is stopped

New SQL Server 2014/2016 MP Features and Fixes

  • No extra permissions on remote WMI are now required for Local System account when Always On hosts have names that are no longer than 15 symbols
  • Fixed: Always On discovery and monitoring scripts cannot read cashed values in Windows registry
  • Fixed: Wrong MP version number in some Always On scripts
  • Fixed: CPUUsage and DBDiskLatency scripts fail with the reason: “Index operation failed”
  • Added retry policy in some Always On workflows to make PS-scripts work more stable
  • Updated the visualization library
  • Fixed: Always On objects get undiscovered when any Always On discovery crashes

New SQL Server Replication 2008/2012/2014/2016 MP Features and Fixes

  • Added support for configurations where computer host names are longer than 15 symbols
  • Fixed: MonitorDistributorSnapshotFreeSpace fails when being launched against SQL Server 2014 SP2
  • Fixed: Wrong source detection in logging
  • Updated the visualization library

New SQL Server Analysis Services 2008/2012/2014/2016 MP Features and Fixes

  • Added support for configurations where computer host names are longer than 15 symbols
  • Fixed: AS workflows sometimes crash
  • Updated the visualization library

New SQL Server Reporting Services 2008/2012/2014/2016 MP Features and Fixes

  • Added support for configurations where computer host names are longer than 15 symbols
  • Fixed: Web Service monitors do not support URL reservation https://+:/ (protocol is HTTPS)
  • Updated the visualization library

New SQL Server Dashboards Features and Fixes

  • Fixed: Tiles content is replaced with question signs after a long period of inactivity

For more details, please refer to the user guides that can be downloaded along with the corresponding Management Packs.
We are looking forward to hearing your feedback at sqlmpsfeedback@microsoft.com.

 

Test Controller, Test Agent versions and their usage in different scenarios

$
0
0

There have been several questions on the different scenarios related to running automated tests in various workflows and which versions can / cannot be used.

Let’s broadly use the following 2 categories of scenarios:

  1. Test Controller/Test Agent (TC/TA) scenarios – this refers to on-premises load testing, running automated tests in the XAML build workflows, triggering an on-demand execution of automated tests using MTM and creating and managing lab environments using Visual Studio Lab Management.
  2. Team Build / Release Management scenarios – this is for running functional tests in the Team Build / Release Management workflows, using the ‘Visual Studio Test Agent Deployment’ and ‘Run Functional Tests’ tasks from the task catalog.

Agents for Visual Studio 2013 Update 5

  • Can be used for TC/TA scenarios
  • Cannot be used for Team Build/Release Management scenarios
  • Can run tests that were built using Visual Studio 2013 and Visual Studio 2015.

Agents for Visual Studio 2015 and Agents for Visual Studio 2015 Update 3

  • Cannot be used for TC/TA scenarios
  • Can be used for Team Build / Release Management scenarios
  • Can run tests that were built using Visual Studio 2015 and Visual Studio 2013.

Agents for Visual Studio 2017 Preview

  • Can be used for TC/TA scenarios
  • Cannot be used for Team Build / Release Management scenarios in the current Preview release. The support for this scenario will be added in the Visual Studio 2017 RTM timeframe.
  • Can run tests that were built using Visual Studio 2017 RC.

TFS 2017 RTM

  • ‘Visual Studio Test Agent Deployment’ and ‘Run Functional Tests’ tasks in the Team Build / Release Management scenarios use the Agents for Visual Studio 2015 Update 3 package. As such, the tasks in their current form can be used for running tests built using Visual Studio 2015 and Visual Studio 2013. In the TFS 2017 Update 1 timeframe, the tasks will be updated to leverage Agents for Visual Studio 2017 so that you can then also run tests built using Visual Studio 2017 in Team Build/Release Management.

Content for the various download locations for these SKUs is being updated as well.

Bringing Office 365 to new markets

$
0
0

Today, we are announcing the availability of Office 365 in 10 new markets: Bhutan, Cambodia, Greenland, Guadeloupe, Laos, Maldives, Martinique, Mozambique, Myanmar and Vatican City. With this launch, Office 365 is now available in 150 markets and 44 languages.

office-new-markets-1

More than 1.2 billion people around the world use Office—at school, at work and in their personal lives. As our service expands, we are mindful of the incredible and increasing diversity of Office users. This latest market expansion required innovative engineering work to create new languages, cultures and currencies.

Our team works tirelessly to meet the highest levels of security, compliance and feature parity so that we can deliver the same first-class experience in Office 365 to every market where it’s offered. We plan to launch a further 97 markets over the next year. Stay tuned for more updates.

—Tom Batcheler, @TomBatcheler, senior product marketing manager for the Office 365 team

The post Bringing Office 365 to new markets appeared first on Office Blogs.

This Week on Windows: Black Friday Edition

$
0
0

Save big on hit apps, games, movies & more with deals in the Windows Store

Today, we’re excited to share all the awesome deals the Windows Store has for Black Friday! Available until Nov. 28, this collection* includes great deals on apps, games, albums, music, movies and more for your Windows 10 PC or Xbox console. Keep reading for some of the top titles, check out the full collection, or head over here to learn more about all the great deals on Windows 10 devices and all things Xbox we mentioned in this week’s latest episode.

GAMES

Gears of War 4 – 40% off

This Week on Windows: Black Friday Edition

Beginning today through Nov. 28, purchase Gears of War 4 at 40% off and receive the entire Gears of War Collection for play on Xbox One. Get the game today and play the beginning of a new saga for one of the most acclaimed franchises in video game history. Buy Gears of War 4 from the Windows Store here and don’t forget when you purchase this title on your Windows 10 PC, you can also play on Xbox One with Xbox Play Anywhere!

Forza Horizon 3: Standard Edition – 35% off

This Week on Windows: Black Friday Edition

Beginning today through Nov. 28, purchase Forza Horizon 3: Standard Edition for 35% off. Get in the driver’s seat and explore Australia in over 350 of the world’s greatest cars. Customize everything, hire and fire your friends, and make your Horizon the ultimate celebration of cars, music, and freedom of the open road. Purchase Forza Horizon 3: Standard Edition from the Windows Store here.

ReCore – 50% off starting Nov. 25

This Week on Windows: Black Friday Edition

Starting Nov. 25 through Nov. 28, purchase ReCore at 50% off! From acclaimed creator Keiji Inafune and the makers of the award-winning Metroid Prime franchise, ReCore is an original action-adventure game crafted for the modern generation. Be sure to check back and visit ReCore in the Windows Store on Nov. 25 for 50% off.

Batman: The Telltale Series – Chapter 1 FREE

This Week on Windows: Black Friday Edition

Beginning today through Nov. 28 get Chapter 1 of Batman: The Telltale Series for free (regularly $4.99). From the award-winning creators of The Walking Dead comes Batman: The Telltale Series, a gritty, violent journey into the fractured psyche of the Caped Crusader’s alter ego, Bruce Wayne. In this interactive, episodic game series, based on DC Comics’ iconic Batman, your actions and choices will determine the fate of our hero.

APPS

Exclusive 14-day free trial of Sling TV

Sling TV app in the Windows Store

Your Sling TV** exclusive is here! Get an extended 14-day free trial of Sling TV and start watching the best of live TV straight from Windows 10. Stream your favorite live shows and on-demand entertainment, including live college basketball and football, and your favorite shows from premium channels. Download the app today and get 14 days FREE of live TV, only on Windows 10.

Buy the Polarr Photo Editor Pro app for $1.99 – on sale from $19.99

This Week on Windows: Black Friday Edition

Polarr is a simple, powerful, and easy to use photo-editing app, it’s bundled with every feature you could imagine, from local adjustments and advanced cropping to curves and watermark tools. There’s even a collection of over 100 filters to play with. Adjust images with a single click and make your photos looks stunning, instantly. Get the app for only $1.99!

Media Player Gold – Buy for $2.99

This Week on Windows: Black Friday Edition

Beginning today through Nov. 28, purchase Media Player Gold for $2.99 (regularly $18.99). Looking for one app to organize and play all your media files? Look no further. Media Player Gold lets you play different media files; search on SoundCloud and YouTube and add the results to a playlist; use LastFM scrobbling; set a sleep timer; and so much more.  If you live for music and love video, you need Media Player Gold.

MUSIC

Groove Music Pass – 4-month extended free trial and more music deals

This Week on Windows: Black Friday Edition

New to Groove? This week only, Nov. 22-29, eligible users can sign up for a Groove Music Pass 30-day free trial and get a token for 3 additional months free. That’s an incredible four months total, all for free. Get albums from today’s hottest artists along with millions of other songs – on-demand, with no ads, custom playlists, artist radio and more. Or, buy top albums including Justin Bieber’s album, Purpose, and The Weeknd’s album Beauty Behind the Madness for just $.99 each***.

MOVIES

 This Week on Windows: Black Friday Edition

Don’t miss all the awesome deals on movies in the Windows Store starting Nov. 25***, including The Martian, a gripping tale of human strength and the will to survive, starring Matt Damon as an astronaut stranded on Mars. Or, get Deadpool– the story of a Special Forces operative-turned-mercenary Wade Wilson (Ryan Reynolds) out for revenge. Both will be available to own and watch on your Windows 10 or Xbox device at their lowest price ever starting Nov. 25 (limited quantities available).

The Black Friday collection in the Windows Store is live now and available until Nov. 28. Head over here to see everything!

*Available in Australia, US, Canada, Mexico, Brazil, UK, France, Germany and Italy
**US only
***US, UK and Canada only

The post This Week on Windows: Black Friday Edition appeared first on Windows Experience Blog.


Windows Ink 3: Beyond Doodling

$
0
0

In the first post in this series, we took a quick look at Windows Ink using the InkCanvas and saw that it can be as simple as one line of code to add inking support to your application. In the second post, we show you how to customize the Ink experience in your app with InkToolbarCustomPen and InkToolbarCustomToolButton, in addition to the out-of-the box items like InkToolbarBallpointPenButton and InkToolbarPenConfigurationControl.

In both of those explorations, we stayed within the context of a drawing style application. In today’s post, we will look at how Windows Ink can be used to bring the natural input experience of using a pen to other types of applications and scenarios.

Pen input can be useful in a majority of applications that require some sort of user input. Here are a few examples of such a scenario:

  • Healthcare: Doctors, nurses, mental health professionals
    • A digital Patient Chart, allowing a medical professional to keep using the efficient natural note keeping of medical shorthand alongside accurate data entry.
  • School: Teachers, students, and administrators
    • A student could take an exam using Windows Ink on a digital exam and the teacher could mark up on that actual exam as if it were paper.
  • Field services: Police, fire, utility engineers
    • Detectives generally keep a small notepad with them to record investigative details. Using ink to input these details allows the notes to be digitally searchable, this allows for faster situational awareness and AI interpretation.
  • Music: composers, musicians
    • Writing notation digitally with a pen combines the world of natural input with the power of digital music processing

Let’s explore two of those possibilities: music and healthcare.

A Music Scenario

Music composition has traditionally been a pen and paper experience. You may or may not have paper with the music staves already printed on it, but in the end, the composer is the one who writes down the notes, key signatures, and other musical notation for a musician to play. Composers have been trained and have years of experience writing music on paper.

What if an application uses a digital pen and the screen as the main method for the composer to create music? The pen input would be a natural way to input the information, but also gain the advantages of having software process that information.

An example of this processing would be for validation of the musical notation; it would also offer a way for the music to be played back immediately after entering that information. There have been many programs in the past that allow for music notation to be entered and played back, but using a pen instead of a keyboard and mouse brings this to a new, natural, level.

A Healthcare Scenario

Healthcare professionals have long used pen and paper to record and convey important information. Sometimes this information is written using a medical shorthand on patient charts. This shorthand contains a lot of information in a smaller area so medical professionals can read a patient’s chart quickly.

However, we also have information that needs to fully written out, like a patient’s name or instructions to a patient for follow-up. This kind of information should be in the form of text clearly readable by anyone and usable for data entry.

We can fulfill both of these requirements with Windows Ink. For the notation and shorthand, we can record the ink strokes as we did previously in the sketching app examples. For the text entry, you can convert the ink using handwriting recognition.

Let’s make a small Medical Chart demo app to see how this is done.

Simple Doctor’s notes app

To show how you can implement enterprise features, let’s use Handwriting Recognition! You can easily get the user’s stroke as text using the InkCanvas and just a few lines of code. This is all built-into the SDK, no extraneous coding or specialized skillset required.

Let’s start with a File > New UWP app and on the MainPage, let’s make three Grid rows. The top two rows will contain two different InkCanvas objects and the last row is for a CommandBar with a save button.

The second row’s InkCanvas will be for the doctor’s handwritten using shorthand. It is more like a sketch app and is tied to an InkToolbar. The ink will be pressure-sensitive and can be further altered using the InkToolbar. You can go back to the last post in this series to see how to do this.

Here’s a quick sketch of what the page layout should be:

picture1

Now that we have a general page layout, let’s focus on the top InkCanvas first. This is the one we’ll use for handwriting recognition for the patient’s name. We want the ink to be plain and clear, so we don’t want an InkToolbar for this InkCanvas.

This code for this row is:

Now let’s look at the second row’s InkCanvas. This is the one we want to have an InkToolbar for so the notes can have a rich ink experience. Here’s what that implementation looks like:

There are a couple other little things we want to add, for example the TextBlock at the top of the page where the patient’s name would appear after the handwriting recognition is complete. Let’s take a look at the entire page with all the parts in place:

With the front end done, let’s look at the code-behind and examine the InkCanvas setup and button click event handlers. In the page constructor, we set up some inking attributes for both InkCanvases (put this code after InitializeComponent in the page constructor):


// Setup the top InkCanvas
NameInkCanvas.InkPresenter.InputDeviceTypes =
                Windows.UI.Core.CoreInputDeviceTypes.Mouse |
                Windows.UI.Core.CoreInputDeviceTypes.Pen;
            
NameInkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(new InkDrawingAttributes
{
     Color = Windows.UI.Colors.Black,
     IgnorePressure = true,
     FitToCurve = true
});

// Setup the doctor's notes InkCanvas
NotesInkCanvas.InkPresenter.InputDeviceTypes =
                Windows.UI.Core.CoreInputDeviceTypes.Mouse |
                Windows.UI.Core.CoreInputDeviceTypes.Pen;

NotesInkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(new InkDrawingAttributes
{
    IgnorePressure = false,
    FitToCurve = true
});

To get the patient’s name into the chart, the healthcare worker writes the name in the top InkCanvas and presses the RecognizeHandwritingButton. That button’s click handler is where we do the recognition work. In order to perform handwriting recognition, we use the InkRecognizerContainer object.


var inkRecognizerContainer = new InkRecognizerContainer();

With an instance of InkRecognizerContainer, we call RecognizeAsync and pass it the InkPresenter’s StrokeContainer and InkRecognitionResult — all to tell it to use all the ink strokes.


// Recognize all ink strokes on the ink canvas.
var recognitionResults = await inkRecognizerContainer.RecognizeAsync(
                    NameInkCanvas.InkPresenter.StrokeContainer,
                    InkRecognitionTarget.All);

This will return a list of InkRecognitionResult which you can iterate over and call GetTextCandidates in each iteration. The result of GetTextCandidates is a list of strings that the recognition engine thinks best matches the ink strokes. Generally, the first result is the most accurate, but you can iterate over candidates to find the best match.

Here’s the implementation of the doctor’s note app; you can see that it just uses the first candidate to demonstrate the approach.


 // Iterate through the recognition results, this will loop once for every word detected
foreach (var result in recognitionResults)
{
    // Get all recognition candidates from each recognition result
    var candidates = result.GetTextCandidates();

    // For the purposes of this demo, we'll use the first result
    var recognizedName = candidates[0];

    // Concatenate the results
    str += recognizedName + " ";
}

Here is the full event handler:


private async void RecognizeHandwritingButton_OnClick(object sender, RoutedEventArgs e)
{
    // Get all strokes on the InkCanvas.
    var currentStrokes = NameInkCanvas.InkPresenter.StrokeContainer.GetStrokes();

    // Ensure an ink stroke is present. 
    if (currentStrokes.Count < 1)
    {
        await new MessageDialog("You have not written anything in the canvas area").ShowAsync();
        return;
    }

    // Create a manager for the InkRecognizer object used in handwriting recognition.
    var inkRecognizerContainer = new InkRecognizerContainer();

    // inkRecognizerContainer is null if a recognition engine is not available.
    if (inkRecognizerContainer == null)
    {
        await new MessageDialog("You must install handwriting recognition engine.").ShowAsync();
        return;
    }

    // Recognize all ink strokes on the ink canvas.
    var recognitionResults = await inkRecognizerContainer.RecognizeAsync(
                    NameInkCanvas.InkPresenter.StrokeContainer,
                    InkRecognitionTarget.All);

    // Process and display the recognition results.
    if (recognitionResults.Count < 1)
    {
        await new MessageDialog("No recognition results.").ShowAsync();
        return;
    }

    var str = "";

    // Iterate through the recognition results, this will loop once for every word detected
    foreach (var result in recognitionResults)
    {
        // Get all recognition candidates from each recognition result
        var candidates = result.GetTextCandidates();

        // For the purposes of this demo, we'll use the first result
        var recognizedName = candidates[0];

        // Concatenate the results
        str += recognizedName + " ";
    }

    // Display the recognized name
    PatientNameTextBlock.Text = str;

    // Clear the ink canvas once recognition is complete.
    NameInkCanvas.InkPresenter.StrokeContainer.Clear();
}

Last, although we covered this in detail in the last post, let’s review how to save the doctor’s notes via InkCanvas ink strokes to a GIF file with embedded ink data:


private async void SaveChartButton_OnClick(object sender, RoutedEventArgs e)
{
    // Get all strokes on the NotesInkCanvas.
    var currentStrokes = NotesInkCanvas.InkPresenter.StrokeContainer.GetStrokes();

    // Strokes present on ink canvas.
    if (currentStrokes.Count > 0)
    {
        // Initialize the picker.
        var savePicker = new FileSavePicker();
        savePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
        savePicker.FileTypeChoices.Add("GIF with embedded ISF", new List() { ".gif" });
        savePicker.DefaultFileExtension = ".gif";

        // We use the patient's name to suggest a file name
        savePicker.SuggestedFileName = $"{PatientNameTextBlock.Text} Chart";
                
        // Show the file picker.
        var file = await savePicker.PickSaveFileAsync();

        if (file != null)
        {
            // Prevent updates to the file until updates are finalized with call to CompleteUpdatesAsync.
            CachedFileManager.DeferUpdates(file);

            // Open a file stream for writing
            using (var stream = await file.OpenAsync(FileAccessMode.ReadWrite))
            using (var outputStream = stream.GetOutputStreamAt(0))
            {
                await NotesInkCanvas.InkPresenter.StrokeContainer.SaveAsync(outputStream);
                await outputStream.FlushAsync();
            }

            // Finalize write so other apps can update file.
            var status = await CachedFileManager.CompleteUpdatesAsync(file);

            if (status == FileUpdateStatus.Complete)
            {
                        PatientNameTextBlock.Text += " (saved!)";
            }
        }
    }
}

Here’s what the app looks like at runtime:

picture2

This is just a simple example of how to combine different uses of Windows Ink, but it demonstrates the usefulness of using Windows Ink in an enterprise scenario and that it’s much more than just a doodling tool.

The patient’s name was recognized and placed in the TextBlock at the top of the app and the doctor’s notes on the bottom can be saved to a file and reloaded exactly as it was written.

Here’s what the doctor’s notes file looks like in Windows File Explorer after it’s been saved. It’s a GIF but also has the embedded ink data that you can load back into the app as ink strokes.

picture3

What’s next?

Think about how you can add inking support to your next application applications. How can adding natural use input with a pen help your user enter data in a seamless and delightful manner? You can add Inking support with just a few lines of code and bring the Windows Ink experience to your users.

We look forward to the exciting app ideas and scenarios you create using Windows Ink. Let us know what you create by leaving us a comment below, sending us a tweet or post on our Facebook page.

Resources

The post Windows Ink 3: Beyond Doodling appeared first on Building Apps for Windows.

Follow a PR, task versioning, and search for commits in branches – Nov 23

$
0
0

Note: The improvements discussed in this post will be rolling out throughout the next week.

We have a bunch of new features rolling out this sprint.

Search for commits in branches

You can now search for a commit in a specified branch or a tag by clicking on the Search in branches button on the commit details page.

commit search

You can select tags and branches in the window to view whether these branches and tags contain the particular commit.

commit search dialog

Search for a file or folder in commit history

Similar to the files tab, users can now search for a file or folder in a repository and see the history of commits for that file or folder. For any Git repository, go to the path control box on the History tab and start typing to initiate a history search experience for the file or folder you are looking for.

commit history

Follow a pull request

You can now follow a pull request to stay notified of any changes via email alerts. The option to Follow is available in the context menu.

Follow PR

Restart pull request merge

Another option has been added to re-attempt the merge for a pull request where the target branch has been updated. This Restart merge option is useful when you want to verify that recent changes to the target branch haven’t created conflicts or broken your PR build.

Completion blocked on rejected pull requests

Branches that have the code review policy set will notice that the PR is unable to be completed if it is rejected by one or more reviewers. Many users expect this behavior, so we’ve changed the default behavior. For teams that want the original behavior, there is a new option in the branch policy setting page.

code review policy

Markdown in pull request description

Spice up your pull request description with Markdown. The same Markdown support you know and love in pull request comments is now available in the pull request description.

Task versioning for Build and Release definitions

By popular request, we’re giving you control over the major version of a task that you run in your build or release. We expect this change to result in fewer unpredictable errors that were caused by automatic updates to the agent and task version. You now specify the major version of the task on the Build tab of your definition, or on the Environments tab of your release definition.

When a minor version is released (for example, 1.2 to 1.3), you get that change automatically in your build. But if a new major version is released (for example 2.0), then your build stays locked to version 1.3 until you edit the definition and manually change to the new major version. A flag in the build definition alerts you to new major versions.

If you select a version named something such as 1.* (preview), keep in mind that this version is still under development and might have known problems.

Tip: In a build definition you’ve got a few options to test a new major version of a task:

  • If you change the version and have problems, you can revert the change from the history tab.
  • Clone the build definition and test the cloned definition with the new major task version.

Hosted Linux pool preview

We’re offering a preview of our new hosted Linux pool to enable you to build and release on Linux machines without having to configure a private agent.

The agents in the hosted Linux pool run on an Ubuntu Linux host inside the vsts-agent-docker container. This container includes all the standard Java, Node, Docker and .NET Core tooling. When we start the container we map in the Docker socket from the host VM and the working folder from /opt/vsts/work. This enables you to create or spawn other Docker containers as part of your build or release process using either a script or the Docker extension in the Visual Studio Marketplace.

To use the Hosted Linux pool:

  • In your build definition, go to the General tab, open the Default agent queue menu, and then select Hosted Linux.
  • In your release definition, go to the Environments tab, select your Run on agent task, open the Deployment queue menu, and then select Hosted Linux.

If you don’t see the option yet, just give it a little time. We’re rolling this option out to accounts over the next few weeks.

Build and deploy Docker apps to Azure more easily

To make continuous integration and deployment (CI/CD) of Docker apps a whole lot simpler for you, we’ve:

  • Updated the Docker extension with support for Azure Container Service and Azure Container Registry.
  • Begun a preview of the Hosted Linux pool preview so that you don’t have to set up your own Docker hosts.
  • Released Visual Studio 2017 RC and included new continuous delivery tools for ASP.NET Core Preview apps. You can use these tools to configure a CI/CD process quickly in Team Services. Any ASP.NET Core project with Docker support enabled can be set up to run an automated build and deployment to Azure Container Service with every Git push.

New licensing model for Build and Release Management

Over the next two weeks, Build and Release Management will move from the current agent-based licensing model to a concurrent pipeline based licensing model. Each pipeline lets you run one build or deploy one release at a time. The maximum number of concurrent builds that you can run and releases that you can deploy at the same time is limited only by the number of pipelines that you have.

Your Team Services account includes these free amounts:

  • One free Hosted Pipeline: With this free hosted pipeline, you get 4 hours (240 minutes) per month and a maximum duration of 30 minutes per build or deployment. If you just need more build time for once concurrent build or release, buy another hosted pipeline without the 4-hour limit to increase your maximum duration per build or deployment up to 6 hours. For more concurrent builds or releases, buy more hosted pipelines.
  • One free Private Pipeline: With this free private pipeline, run unlimited concurrent builds or deploy one release at a time in Team Foundation Server 2017, or run one build or deploy one release at a time in Team Services on agent software from Microsoft. Private agents are now free and unlimited. In TFS, each Visual Studio Enterprise subscriber also contributes a private pipeline that you can use. You can also buy more private pipelines.

For more information, see Concurrent build and release pipelines in Team Services and Concurrent release pipelines in TFS.

If you previously bought private agents in the Azure portal, they’ll automatically roll into private pipelines. Similarly, any hosted agents that you purchased become Hosted pipelines. With the new licensing model, you can register any number of private agents with your account. In effect, the new model gives you more than what the previous model did, for the same price.

NuGet + Credential Provider Bundle updated

We’ve updated the NuGet + Credential Provider Bundle to NuGet 3.5. NuGet 3.5 contains many performance improvements and bug fixes, and we recommend updating to it at your convenience.

Delete test artifacts

Customers already had the ability to delete work items, except for test artifacts and any work items which are linked to test artifacts. With this update, users will now have the ability to permanently delete test artifacts—test plans, test suites, test cases, shared parameters and shared steps—both from the Test hub and the Work hub by using the Permanently delete option in the work item form context menu.

delete test artifacts menu

Deletion of a test artifact not only deletes the selected artifact but also all the child items like child test suites, tests across all configurations and testers, their test result history and other associated history that fall in its hierarchy. In the confirmation dialog box, users can view the impact of their delete operation to help them make an informed decision.

delete test artifacts confirm

Inline service connections in Build and Release

With this feature, you can create service connections right in the build/release definition without having to navigate to the Services tab. This will be auto-enabled for all extensions which are defined declaratively, such as Docker, Jenkins, VMWare, and SCVMM.

Until now, release definitions could only link artifact sources from the current project. Now, you can now link build artifacts from another project as well. While linking an artifact, the project drop down will list all the projects in the account.

build artifacts

As always, if you have ideas on things you’d like to see us prioritize, head over to UserVoice to add your idea or vote for an existing one.

Thanks,

Erin Dormier

Dev Projects for the Long Weekend

$
0
0

Find your favorite chair, kick your feet up and grab yourself a cup of coffee. It’s finally time to pick up some of the dev projects you’ve been eyeballing from behind the hazy fog of pre-vacation deadlines.

For the long weekend, we’ve assembled a quick list of three projects we’ll be working on between family time and scouring Stack Overflow for answers to life’s questions. Take a look below to get started!

IoT for the Whole Family

IoT projects can be both fun and practical – take a look at a few of our favorite selections below. After securing your home with an IoT Security Camera and automating the rest of your house, you might really need to think about rewarding yourself with that automated Kegerator. Just saying.

Explore the Devices and Sensors GitHub Library

Thirty-five samples to work with right here, folks! With these samples, you can get familiar with the API usage patterns that make the UWP unique. This section has code samples for accelerometers, relative inclinometers and pretty much everything in between.

Dive into Microsoft Open Source Code

We’re still reeling in the excitement about our partnership with the Linux Foundation and the steps we’re taking to make the UWP an increasingly open platform. Take a look at our existing Open Source projects over on Github to see how you can get started.

And that’s all! Have a great long weekend and remember to tweet us if you have any questions or comments!

Download Visual Studio to get started.

The Windows team would love to hear your feedback.  Please keep the feedback coming using our Windows Developer UserVoice site. If you have a direct bug, please use the Windows Feedback tool built directly into Windows 10.

The post Dev Projects for the Long Weekend appeared first on Building Apps for Windows.

Kick off the holiday ‘to-do’ season with Windows 10 features and devices

$
0
0

Windows 10 can help you make the most of your holidays in ways like creating to-do lists with Cortana* and making holiday shopping a little easier with Cortana and Microsoft Edge. Together with the latest Windows 10 devices, you can make the most out of the holidays in style. The latest Windows 10 devices from our partners are thinner, lighter and more beautiful than ever, with long battery life to power through your holidays on-the-go. New, higher-resolution screens and small-bezel OLED displays offer vibrant color, and 2-in-1 PCs add the flexibility to work on a laptop, draw on a tablet with Windows Ink or flip to the perfect angle to watch holiday movies – all with the same device.

Budget-friendly devices

ASUS Transformer Mini T102– This 10.1-inch detachable 2-in-1 PC with a smart-hinge kickstand provides up to 170 degrees of flexibility.

ASUS Transformer Mini T102 – This 10.1-inch detachable 2-in-1 PC with a smart-hinge kickstand provides up to 170 degrees of flexibility.

At 1.7 pounds, it’s loaded with powerful Windows 10 features, including Cortana and a built-in fingerprint reader for secured, password-free log in with Windows Hello. Plus, you can get creative with Windows Ink and Pen. This device starts at $299 USD.

HP Stream 13– This sleek laptop gives you the speed and power to stay entertained and productive.

HP Stream 13 – This sleek laptop gives you the speed and power to stay entertained and productive.

With Office 365 Personal included, you can use Windows 10 to kick-start your holidays, stay on top of work and enjoy the DTS Studio Sound for an immersive surround experience. This device starts at $279 USD.

Premium Devices

Lenovo Yoga 910– This ultra-slick, eye-catching convertible 2-in-1 weighs in at just over three pounds.

Lenovo Yoga 910 – This ultra-slick, eye-catching convertible 2-in-1 weighs in at just over three pounds.

At almost half an inch thin, it sports a 360-degree watchband hinge for use as a laptop, tablet or display, plus a nine-hour battery. The built-in fingerprint reader for secured, password-free log in with Windows Hello and touchscreen bring out the best in Windows 10. This device starts at $1,049 USD.

Dell XPS 13– The stunning, virtually borderless InfinityEdge display is great for viewing pictures and videos with friends and family or online shopping with Microsoft Edge.

Dell XPS 13 – The stunning, virtually borderless InfinityEdge display is great for viewing pictures and videos with friends and family or online shopping with Microsoft Edge.

Light, thin and fast, with a battery that lasts up to 22 hours, it’s one of the smallest 13-inch laptops on the market, but has big Windows 10 features like Microsoft Edge and Cortana. This device starts at $999 USD.

HP Spectre x360– Sleek and ultra-slim, this convertible PC offers beauty, flexibility and power.

HP Spectre x360 – Sleek and ultra-slim, this convertible PC offers beauty, flexibility and power.

The 360-degree hinge lets you flip to the perfect view. Get creative with the Full HD touchscreen and enjoy blazing fast performance, while using all the features in Windows 10 for work and play. Get rid of passwords with the built-in Windows Hello face sign-in camera and browse the web with Microsoft Edge. This device starts at $1,149 USD.

Let’s talk a little more about how Windows 10 devices can help you manage the holiday season with digital tools to stay secure, handle your to-do list and even enjoy a few moments for yourself.

Keep your devices secure and your gifts under wraps

With Windows Hello, you can sign into your Windows 10 devices* and apps** in less than 2 seconds – that’s 3 times faster1 than a password that you have to remember and type in. Windows Hello uses your face or fingerprint to recognize you instantly. When it’s time to do some online shopping, use the Microsoft Edge browser for a faster, safer browsing experience. If you share a computer, you can use InPrivate browsing, which doesn’t store cookies, history or temporary files from your browsing session. That means no accidental gift exposure.

Stay productive through the holidays

Want to make a quick list or get creative with your to-do list? Windows Ink and Pen give you the freedom of natural movement with a digital pen that is as easy to use as pen and paper. Use it with OneNote or a Sticky Note to jot down a few items and they’ll automatically turn into a checklist. Or markup webpages right in Microsoft Edge when you’re idea-shopping online — just circle the item you like, right on the web page, and save it or send it. You can even use Ink in the Windows 10 Maps app for trip planning.

Never miss a beat or a festive moment 

Cortana, your personal digital assistant, can help you breeze through the holidays. You can type or talk to Cortana on your PC, tablet or phone. If you’re worried about getting to that holiday party on time, Cortana can check traffic and let you know when to leave. Cortana can even remind you to bring the eggnog (or help you find some at the nearest store). And when you’re up to your elbows in cookie dough, if you’ve activated “Hey Cortana” in your settings, you can say “Hey Cortana” from across the room, and ask how many ounces are in two teaspoons and Cortana can help you get that answer — no sticky fingers required.

The holidays can be a hectic time for all, but they don’t have to be with the help of Microsoft and new beautiful Windows 10 devices.

*Cortana available in select markets.
* Windows Hello requires specialized hardware, including fingerprint reader, illuminated IR sensor or other biometric sensors and capable devices.
** Limited to compatible apps.
1Based on average time comparison between typing a password respectively detecting a face or fingerprint to authentication success.

The post Kick off the holiday ‘to-do’ season with Windows 10 features and devices appeared first on Windows Experience Blog.

Search Bing to Find Holiday Hours for Local Businesses

$
0
0
Many businesses change their hours of operation during the holiday season. Some stores close on Thanksgiving, some restaurants shorten their service hours, and some national retailers even open the evening of Thanksgiving so people can start Black Friday shopping festivities early. These fluctuating hours of operation make it difficult to plan shopping and dining outings.
 
To help, Bing local is collaborating with business owners and trusted partners to get accurate holiday hours in real time. When you search for local businesses, you’ll receive up-to-date changes for holiday hours.
 
You will see upcoming holiday hours and closures highlighted a week before the big event, making it easy to schedule your plans.



Holiday Hours
  
The Bing holiday hours feature will be launched to both Desktop and Mobile immediately for all holidays moving forward. Feedback is always welcome.
   
Happy Holidays,
The Bing Team


 
Viewing all 13502 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>