Also, remove any package references to Microsoft.AspNetCore.Components.WebAssembly.Build, as it is no longer needed.
What’s new?
Blazor WebAssembly apps now target .NET 5
Blazor WebAssembly 3.2 apps have access only to the .NET Standard 2.1 API set. With this release, Blazor WebAssembly projects now target .NET 5 (net5.0) and have access to a much wider set of APIs. Implementing Blazor WebAssembly support for the APIs in .NET 5 is a work in progress, so some APIs may throw a PlatformNotSupportedException at runtime. We’d love to hear from you if you’re blocked by the lack of support for specific APIs.
Updated debugging requirements for Blazor WebAssembly
To enable debugging of Blazor WebAssembly apps in Visual Studio Code, you previously needed to install the JavaScript Debugger (Nightly) extension. This is no longer required as the JavaScript debugger extension is now shipped as part of VS Code. If you’ve previously installed the JavaScript Debugger (Nightly) extension you can now uninstall it. Enabling the preview version of the JavaScript debugger through the Visual Studio Code settings is still required.
Blazor accessibility improvements
The built-in Blazor input components that derive from InputBase now render aria-invalid automatically when the validation fails.
Blazor performance improvements
One of the major areas of investment for Blazor WebAssembly in .NET 5 is improving runtime performance. This is a multifaceted effort. Below are some of the high-level areas being optimized:
.NET runtime execution
JSON serialization
JavaScript interop
Blazor component rendering
Improving Blazor WebAssembly runtime performance for .NET 5 in an ongoing effort. This release contains some initial performance improvements, and we expect to share more details on the results of this performance work for future .NET 5 updates.
We have added caching to certificate authentication in ASP.NET Core. Caching certificate validation significantly improves the performance of certificate authentication. Our benchmarks show a 400% improvement in requests per second once caching was enabled.
You don’t need to make any changes to your app to take advantage of performance improvements; caching is on by default. There are options to tune or disable caching if you wish.
Find out more about certificate authentication in ASP.NET Core in the docs.
Sending HTTP/2 PING frames
HTTP/2 has a mechanism for sending PING frames as a way of ensuring whether an idle connection is still functional. This is especially useful to have when working with long-lived streams that are often idle but only intermittently see activity (for example, gRPC streams). We have added the ability to send periodic PING frames in Kestrel by setting limits on KestrelServerOptions.
Support for additional endpoints types in the Kestrel sockets transport
Building upon new API introduced in System.Net.Sockets, the sockets transport (default) in Kestrel now allows you to bind to both existing file handles and unix domain sockets. Support for binding to existing file handles enables using the existing Systemd integration without requiring you to use the libuv transport.
Custom header decoding in Kestrel
We added the ability to specify which System.Text.Encoding to use to interpret incoming headers based on the header name instead of defaulting to UTF-8. You can set the RequestHeaderEncodingSelector property on KestrelServerOptions to specify which encoding to use.
For preview 7, we’ve started applying nullable annotations to ASP.NET Core assemblies. We intend on annotating most of the common public API surface of the framework during the 5.0 release.
CompareAttribute can now be applied to properties on Razor Page model.
Parameters and properties bound from the body are considered required by default.
We’ve started applying nullable annotations to ASP.NET Core assemblies. We intend to annotate most of the common public API surface of the framework during the .NET 5 release.
Authorization when using endpoint routing now receives the HttpContext rather than the endpoint instance. This allows the authorization middleware to access the RouteData and other properties of the HttpContext that were not accessible though the Endpoint class. The endpoint can be fetched from the context using context.GetEndpoint().
The default format for System.Diagnostics.Activity now defaults to the W3C format. This makes distributed tracing support in ASP.NET Core interoperable with more frameworks by default.
CompareAttribute can now be applied to properties on a Razor Page model.
FromBodyAttribute now supports configuring an option that allows these parameters or properties to be considered optional:
We hope you enjoy this release of ASP.NET Core in .NET 5! We are eager to hear about your experiences with this latest .NET 5 release. Let us know what you think by filing issues on GitHub.
Nintendo Australia has confirmed that a new shipment of Animal Crossing Switch consoles will be launching across Australia and New Zealand next month.
The console, which features Animal Crossing-inspired designs across the main unit and dock, as well as exclusive, gorgeously coloured Joy-Con, will be available from selected retailers once more starting from 9th October.
A similar restock arrived for Australia back in June, with stock then starting to appear in other regions such as the UK shortly afterwards. Hopefully we’ll see a similar deal here, with other countries also getting restocks over the coming weeks.
Did you manage to secure one of these beauties when they first launched? Have you been keeping an eye out for one ever since? Tell us below.
Marvelous has announced that it will be releasing a Version 1.4.0 update for Daemon X Machina to celebrate the game’s first anniversary.
The game will turn one year old this weekend, but we’ll have to wait until November before the update arrives. Details of the content set to be added have been shared on the game’s official website, with the following translations being provided by Gematsu:
“Grossfeiern” Arsenal skin
“Grandemon” Outer suit
“Eclipse RT: Omega Destruction Strategy” Order – Battle against the strengthened Colossal Immortal “Eclipse Q.”
Three Arsenal decals
Three Preview backgrounds
Some new screens have also been shared, just to tease us a little more while we wait for the update’s release.
Did you pick up Daemon X Machina? Would you be happy to jump back in when the new update drops? Let us know in the comments.
Fargo's Chris Rock Explains How COVID Helped His Performance For Season 4
Like most movie and TV productions during the COVID-19 pandemic, FX's Fargo came to a halt back in March while shooting Season 4. However, a new premiere date of September 27 was announced by the network last month, and this long break was actually good for the star of the new season, Chris Rock.
During an FX event for the press, Rock discussed just what it was like working on a TV show in the midst of a pandemic. "I got in the car. I kissed my wife. She went over the bridge. No that's that Will Smith movie. I'm sorry," Rock said during the press event, referring to Smith's I Am Legend. "It was definitely frustrating to stop when we stopped because you feel like you're on a roll. But you know, you're eight shows in, and you're also exhausted.
"It allowed me--I don't know about everybody else--to like recharge my battery. And, you know, and I saw a couple of the episodes, I was like, 'Okay, let me work on my game.' I don't know if anybody's following basketball right now but the Miami Heat is like, 'Oh they had a break, and now they're better than everybody,' even though they weren't before--like the break helped them more than everybody else. So the break helped me. Honestly, I think my last two shows are my best."
The following one-liner solves the problem in an elegant way using a fine understanding of more advanced Python features (source).
print('\n'.join('Fizz' * (i%3==0) + 'Buzz' * (i%5==0) or str(i) for i in range(1,101)))
The one-liner creates a string using the join function with the newline character as a delimiter. Here’s a short explanation of the function:
The string.join(iterable) method concatenates all the string elements in the iterable (such as a list, string, or tuple) and returns the result as a new string. The string on which you call it is the delimiter string—and it separates the individual elements. For example, '-'.join(['hello', 'world']) returns the joined string 'hello-world'.
So, what’s the iterable, you pass into the join() function? It’s a generator expression of the form: expression for variable in context. You go over all integer values in the context 1 to 100 using the range() function. So, you obtain the remaining expression for i in range(1, 101). What’s the expression part?
It consists of three elements:
'Fizz' * (i%3==0) — The modulo expression i%3==0 returns True only if the integer i is divisible by 3, otherwise it returns False. So, you multiply the string 'Fizz' either with True (=1) or with False (=0). As a result, you obtain the empty string '' in all cases except if the integer i is divisible by 3—in which case you obtain the string 'Fizz'.
'Buzz' * (i%5==0)— The modulo expression i%5==0 returns True only if the integer i is divisible by 5, otherwise it returns False. So, you multiply the string 'Buzz' either with True (=1) or with False (=0). As a result, you obtain the empty string '' in all cases except if the integer i is divisible by 5—in which case you obtain the string 'Buzz'.
You use string concatenation to glue together the previously obtained strings. In most cases, this will be the empty string. If i is divisible by 3, you obtain the string 'Fizz'. If i is divisible by 5, you obtain the string 'Buzz'. And if i is divisible by 3 and 5, you obtain the string 'FizzBuzz'.
or str(i) — In the case you obtained a non-empty string in {'Fizz', 'Buzz', 'FizzBuzz'} in the previous step, the or operation simply returns this string. This is called short circuiting—and it’s used in many programming languages such as Python to improve efficiency of logical operations.
But if the string is empty, it is interpreted as a logical False. Thus, Python returns the second operand of the or operation. The second operand simply is the string representation of the integer i.
A very interesting implementation of the FizzBuzz problem indeed!
FizzBuzz One-Liner 2: Slicing
An alternative is given in the following nice one-liner (source):
for i in range(1, 101): print('FizzBuzz'[i*i%3*4:8--i**4%5] or i)
Wow—what a short and concise one-liner solution! But how does it work?
You iterate over all values from i=1 to i=100 and print a string. So far so good.
You use the or operation and slicing to determine the string 'FizzBuzz'[start:end] or i generates the output.
You use the property of short circuiting in Python: If 'FizzBuzz'[start:end] is empty, the integer i is returned, otherwise, the non-empty string is returned.
You carve out a substring from 'FizzBuzz' using slicing as follows.
Slicing is a concept to carve out a substring from a given string. Use slicing notation s[start:stop:step] to access every step-th element starting from index start (included) and ending in index stop (excluded). All three arguments are optional, so you can skip them to use the default values (start=0, stop=len(lst), step=1). For example, the expression s[2:4] from string 'hello' carves out the slice 'll' and the expression s[:3:2] carves out the slice 'hl'.
In the example, you have the slicing operation 'FizzBuzz'[i*i%3*4:8--i**4%5].
start = i*i%3*4 — Note that the multiplication * and modulo operation % have the same priority, so they are evaluated from left to right. If integer i is divisible by 3, i*i is also divisible by 3, and the start index is 0. In all other cases, the start index is 4. Thus, the slice either starts with 'Fizz' or 'Buzz'.
stop = 8--i**4%5 — This is 4 in all cases except if the number i is divisible by 5, in which case this is 8.
So, there are four cases:
The number is divisible only by 3: start=0, stop=4 –> 'Fizz'
The number is divisible only by 5: start=4, stop=8 –> 'Buzz'
The number is divisible by both 3 and 5: start=0, stop=8 –> 'FizzBuzz'
The number is divisible by neither 3 nor 5: start = 4, stop=4 –> ''
Phew! This was a hard nut to crack, wasn’t it?
Python One-Liner 3: Map + Lambda
You can find detailed tutorials on the map and lambda functions here:
Those two functions can be used to solve the FizzBuzz problem (source):
print(list(map(lambda i: "Fizz"*(i%3==0)+"Buzz"*(i%5==0) or str(i), range(1,101))))
It’s similar to Method 1 and by now you’re able to figure it out. Think of the different values the integer i can take.
Python One-Liners Book
Python programmers will improve their computer science skills with these useful one-liners.
Python One-Linerswill teach you how to read and write “one-liners”: concise statements of useful functionality packed into a single line of code. You’ll learn how to systematically unpack and understand any line of Python code, and write eloquent, powerfully compressed Python like an expert.
The book’s five chapters cover tips and tricks, regular expressions, machine learning, core data science topics, and useful algorithms. Detailed explanations of one-liners introduce key computer science concepts and boost your coding and analytical skills. You’ll learn about advanced Python features such as list comprehension, slicing, lambda functions, regular expressions, map and reduce functions, and slice assignments. You’ll also learn how to:
• Leverage data structures to solve real-world problems, like using Boolean indexing to find cities with above-average pollution • Use NumPy basics such as array, shape, axis, type, broadcasting, advanced indexing, slicing, sorting, searching, aggregating, and statistics • Calculate basic statistics of multidimensional data arrays and the K-Means algorithms for unsupervised learning • Create more advanced regular expressions using grouping and named groups, negative lookaheads, escaped characters, whitespaces, character sets (and negative characters sets), and greedy/nongreedy operators • Understand a wide range of computer science topics, including anagrams, palindromes, supersets, permutations, factorials, prime numbers, Fibonacci numbers, obfuscation, searching, and algorithmic sorting
By the end of the book, you’ll know how to write Python at its most refined, and create concise, beautiful pieces of “Python art” in merely a single line.
CK3 is out, Dying Light Enchanted Edition with Techland Deals
Dying Light - Enhanced Edition at 75% OFF
[www.indiegala.com] Enjoy the definitive Dying Light experience with the brand-new Legend system, improved visuals, major gameplay enhancements, and more.
Get a free premium pass in grand strategy game Supremacy 1!
Grand strategy is a tough genre to bring to mobile, after all, how do you fit something so big into something so small? But you’d be surprised what’s possible when developers put their minds to it. Long term grand strategy has become especially popular on mobile in recent years, and it’s understandable when you consider that long term strategy is basically idle strategy, as you log on once per day, make a few tactical choices, and then forget about it until the next. It’s a genre which suits mobile surprisingly well.
That’s why we’ve decided to partner with Bytro Labs this week for our giveaway, to hand out some premium passes for WW1 game, Supremacy 1. In each campaign of Supremacy, you play against up to 84 players per match, and face off against each other to take control of the map. These games can last weeks, and sometimes even up to a month, so if you like depth to your strategy, this might be one for you.
Each premium pass gives you one month of High Command, which grants you a building queue, and rally points in the game, which essentially allows you to stack commands for units after they’ve finished recruiting.
If Supremacy 1 sounds like your kind of game, we’ve got Android and iOS entry forms below. Though, if you are going to enter, please do see our terms and conditions first!
With the release of Visual Studio 2019 16.7 Preview 4, you can now try out our new experimental Razor editor for local development with MVC, Razor Pages, and Blazor. We’re excited for you to give it a try!
Enabling the new Razor editor
To enable the new experimental Razor editor in Visual Studio 2019 16.7 Preview 4 or later:
Go to Tools > Options > Environment > Preview Features and select the Enable experimental Razor editor option:
Select OK and restart Visual Studio
That’s it! You’re now setup to use the new Razor editor when working with Razor files locally (.cshtml and .razor).
What is Razor?
Razor is a templating language based on HTML and C# used to define dynamic rendering logic for .NET web apps based on MVC, Razor Pages, and Blazor. In MVC and Razor Pages apps you use Razor to define the rendering logic for your views and pages using .cshtml files. In Blazor, you use Razor to author reusable UI components in .razor files. Razor is a critical part of the experience for building web apps with .NET.
You can give Razor a try today by building your first web app with ASP.NET Core or Blazor.
Why a new Razor editor?
Part of the value of Razor is the rich tooling experience Visual Studio provides for editing Razor files. Visual Studio today provides IntelliSense, completions, and diagnostics for HTML, CSS, JavaScript, C#, and Razor specific syntax all within the same Razor file.
Visual Studio does some tricky gymnastics to enable editor support for all of these languages at the same time in Razor files. The Razor document is parsed to determine its constituent parts, and then each part is projected into a language specific buffer called a projection buffer. What you see in Visual Studio when editing a Razor document are a collection of little windows into each of these projection buffers to make up one whole document. Each language service then independently handles the editing experiences for each of these separate projection buffers.
The way Visual Studio handles this Razor code looks something like this:
This project buffer setup works well for Visual Studio and Visual Studio for Mac, but it’s problematic for remote editing scenarios, like Visual Studio LiveShare or Visual Studio Codespaces. It also can’t be used for editors that don’t have projection buffer support, like Visual Studio Code. The lack of a central orchestrator for the Razor editor also makes it difficult to enable new features without careful coordination between the various language service implementations (since they each control their own experience in projected scenarios).
A Razor Language Server
To enable broader support for Razor editing, we have been working for some time on a new Razor editor for ASP.NET Core projects based on a Razor Language Server. This new Razor Language Server implements editor features like auto completion, go to definition, etc. through the Language Server Protocol (LSP), which defines a standard way for an editor or IDE to enable these features. An IDE specific Razor extension then handles coordinating with the Razor Language Server and the other language servers for HTML & C#.
This new Razor Language Server is already being used to enable Razor support in Visual Studio Code as part of the C# extension. It will be the basis for the Razor editing support in Visual Studio Codespaces and Visual Studio LiveShare. And now it is available for local development in Visual Studio as a preview feature.
Currently our focus has been on making the new LSP based Razor editor have functional parity with the existing Visual Studio Razor editing experience (as noted below, there are still a few functional gaps to address). In future releases we expect to fill these functional gaps add significant new functionality, like bringing many more of the C# editing features to Razor, and enabling other new Razor specific productivity improvements.
Known issues
The new Razor editor is currently experimental and has some known limitations. The following Razor editor features have not yet been fully implemented and will be added in a future release:
JavaScript and CSS IntelliSense support
Colorization for C#, JavaScript, CSS, Blazor components, Tag Helpers, and tooltips
Formatting is limited to only C# code in @code and @functions blocks with no embedded HTML markup or Razor syntax
URL picker support in HTML
C# snippets (‘prop’, ‘ctor’, etc.)
Complex C# completions (for example, generating overrides)
Go-to-definition/implementation from C# to Razor
Renames in C# files do not propagate to Razor files
Matching identifier highlight support for HTML and curly braces
There are also some functional issues with the new Razor editor in 16.7 Preview 4 that will be addressed in a future release:
C# error squiggles may be misaligned
Unnecessary informational errors reported for unnecessary using directives in Razor files
Blazor components & Tag Helpers are currently colored like C# classes and don’t respect the Tag Helper colorization option
Give feedback
These are still the early days for the new LSP-based Razor editing experience in Visual Studio. We know that there’s still a lot of work to do before it can replace the existing Razor editing experience in Visual Studio. The new Razor tooling will remain optional and experimental in 16.7 and we don’t expect to make it the default Razor editor until it surpasses the functionality of the existing editor. But, we wanted to share our progress as early as possible to start getting your feedback on how well the new Razor editor works for you. To ensure we ship the best Razor editing experience possible, please give the new Razor tooling a try and let us know what you think. You can share your feedback with us by creating Razor Tooling issues on Github in the ASP.NET Core repo. We appreciate your feedback!
Posted by: xSicKxBot - 09-10-2020, 05:51 AM - Forum: Windows
- No Replies
Vroom with a view: HoloLens 2 powers faster fixes for Mercedes-Benz USA
The tools enable diagnostic technicians at the dealerships to troubleshoot a problem in real time by tapping into Mercedes-Benz’ vast ecosystem of remote technical specialists with particular expertise across its various car lines. That network ranges from Mercedes-Benz field specialists in the U.S. who are schooled on the intricacies of each model to engineers at company headquarters in Germany who helped design those vehicles.
Now, a service technician like Edgar Campana, who works at Mercedes-Benz of Coral Gables, can wear a HoloLens 2 and share his view of the car part or car system in question while talking with one of the company’s remote technical specialists, via Dynamics 365 Remote Assist.
Edgar Campana.
If he needs to peer deep inside the layers of machinery, Campana can gesture with his fingers at, say, the engine and immediately see a 3D hologram that appears next to the car.
Watching from a laptop or desktop computer, the remote specialist can ask Campana to turn his head toward a specific part or sensor, then share wiring diagrams, notes or other visual information directly into the view of the HoloLens 2.
What’s more, the remote specialist can draw on the hologram a picture of that engine (or other component) to show the technician where, for example, to adjust a specific cable. Multiple Mercedes-Benz specialists can join the same call.
“It’s like they are there. It’s like I am them,” Campana says. “The expert is looking through my eyes and seeing what I’m seeing so they can guide me.”
Mike Munoz.
During his virtual conversations, Campana can keep his hands free to use his tools. He also can use the HoloLens 2 to drag the specialist-shared diagrams and documents behind him, away from his field of view. If he needs to view them again, he can just turn backward to reference them or drag them back in front.
“It makes everything easier,” Campana says. “We’re able to diagnose and address issues right there, get the car out of the garage and back to the customer much quicker.”
Mercedes-Benz USA has supplied HoloLens 2 devices to its authorized U.S. dealership partners, including Mercedes-Benz of Coral Gables.
Before the rollout, Campana and his fellow diagnostic technicians typically communicated via email with the remote technical specialists, who often are working to troubleshoot multiple queries across U.S. dealerships. Those back-and-forth email exchanges took time.
“We can now resolve issues often in minutes and hours as compared to days, allowing us to serve our customers more quickly with faster turnaround times,” Munoz says.