Lanyon A Simple Blogger template

Free tutorials, courses, generative tools, and projects built with Javascript, PHP, Python, ML, AI,.Net, C#, Microsoft, Youtube, Github Code Download and more.

November 2021

Archive for November 2021

Rust Programming Course for Beginners - Tutorial


Curriculum for the course Rust Programming Course for Beginners - Tutorial

Learn the Rust programming language in this course for beginners. ✏️ Shaun Hamilton created this course. 💻 Rust Template used in video: https://replit.com/@Sky020/Rust-Template?v=1 ⭐️ Resources ⭐️ 🔗 Slides: https://docs.google.com/presentation/d/1k2kPfrLunscHV4n-4IoC3D78dNR6R1Rhdi039PCG-Wk/edit?usp=sharing 🔗 Article version: https://www.freecodecamp.org/news/rust-in-replit/ 🔗 Rust in Replit Course: https://replit.com/github/freeCodeCamp/Rust-in-Replit ⭐️ Course Contents ⭐️ ⌨️ (00:00) Course Introduction ⌨️ (01:16) Rust Overview ⌨️ (02:00) Initialising the CLI Calculator ⌨️ (04:25) Handling Environment Arguments ⌨️ (09:00) Understanding the nth Method ⌨️ (16:00) Parsing Strings into Floats ⌨️ (18:05) Declaring a Function ⌨️ (18:30) If Statements ⌨️ (21:20) Implicit Returns ⌨️ (22:25) Parsing String into Char ⌨️ (23:20) Formatting Output ⌨️ (25:20) Match Control Flow ⌨️ (27:05) Panicking! ⌨️ (28:30) Building a Release ⌨️ (29:30) Initialising the Image Combiner ⌨️ (30:00) Creating Args Module ⌨️ (31:08) Structs ⌨️ (32:30) Declaring the New Module ⌨️ (33:20) Private vs Public ⌨️ (34:30) Implementing the New Function ⌨️ (36:40) Deriving the Debug Trait ⌨️ (37:40) Using get_nth_arg in Struct ⌨️ (38:57) External Crates ⌨️ (39:52) Decoding Images ⌨️ (43:15) Destructuring Tuples ⌨️ (43:56) Importing Missing Types ⌨️ (44:35) Handling Format Errors with Result ⌨️ (46:00) Enums ⌨️ (47:20) Resizing Images ⌨️ (55:00) FloatingImage Struct ⌨️ (56:35) Buffers with Vecs ⌨️ (58:15) TryInto Conversions ⌨️ (1:00:05) Deriving Debug for Enums ⌨️ (1:00:40) Running the Code with Images ⌨️ (1:02:25) Combining the Image Pixels ⌨️ (1:11:20) Understanding Borrows and References ⌨️ (1:12:15) Creating Methods ⌨️ (1:15:20) Error Propagation ⌨️ (1:15:53) Saving the New Image ⌨️ (1:17:30) Using the Image Combiner ⌨️ (1:18:20) Better Error Handling 🎉 Thanks to our Champion and Sponsor supporters: 👾 Wong Voon jinq 👾 hexploitation 👾 Katia Moran 👾 BlckPhantom 👾 Nick Raker 👾 Otis Morgan 👾 DeezMaster 👾 AppWrite -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

Watch Online Full Course: Rust Programming Course for Beginners - Tutorial


Click Here to watch on Youtube: Rust Programming Course for Beginners - Tutorial


This video is first published on youtube via freecodecamp. If Video does not appear here, you can watch this on Youtube always.


Udemy Rust Programming Course for Beginners - Tutorial courses free download, Plurasight Rust Programming Course for Beginners - Tutorial courses free download, Linda Rust Programming Course for Beginners - Tutorial courses free download, Coursera Rust Programming Course for Beginners - Tutorial course download free, Brad Hussey udemy course free, free programming full course download, full course with project files, Download full project free, College major project download, CS major project idea, EC major project idea, clone projects download free

Get to Know EF Core 6

The Entity Framework Core team has released the generally available version of EF Core 6.0 in parallel with .NET 6. EF Core 6 is available as a set of NuGet Packages. At the end of this blog post you will find a packages section that lists all of the available packages and describes what they are used for.

EF Core 6.0 is a modern, cloud-native-friendly data access API that supports multiple backends. Get up and running with a document-based Azure Cosmos DB container using only a few lines of code, or use your LINQ query skills to extract the data you need from relational databases like SQL Server, MySQL, and PostgreSQL. EF Core is a cross-platform solution that runs on mobile devices, works with data-binding in client WinForms and WPF apps “out of the box”, and can even run inside your browser!

Did you know it is possible to embed a SQLite database in a web app and use Blazor WebAssembly to access it using EF Core? Check out Steven Sanderson’s excellent video to see how this is possible. Combined with the power of .NET 6, EF Core 6.0 delivers major performance improvements and even scored 92% better on the industry standard Tech Empower Fortunes benchmark compared to EF Core 5.0 running on .NET 5. The EF Core team and global OSS community have built and published many resources to help you get started.

This blog post lists a few ways to learn about new features and get up and running with Entity Framework Core as quickly as possible.

The first step in your journey should always be the comprehensive documentation available online at https://docs.microsoft.com/ef. There you will find everything from a step-by-step guide to build your first EF Core app to a comprehensive list of what’s new in EF Core 6. If you find anything missing, let us know via GitHub issues and/or submit a pull request.

Note: various samples ready to build and run are available on GitHub at: What’s New in EF Core 6 Samples.

Check out our EF Core Community Standup EF Core 6.0 retrospective to hear from the team and several community members about the release. We also presented What’s New with EF Core 6.0 at .NET Conf 2021. Be sure to check out community member Julie Lerman’s comprehensive article EF Core 6: Fulfilling the Bucket List.

For excellent advice regarding updating your existing apps, read Updating your ASP.NET Core and/or EF Core Application to .NET 6.

Get to Know EF Core 6.0

The following major areas were added or improved in EF Core 6.0, and each has several resources to help you get started.

Azure Cosmos DB

The EF Core team invested heavily to ensure that working with Azure Cosmos DB is a first class experience. From simplifying configuration to supporting raw SQL and delivering diagnostics, we believe this is a full featured option for working with the popular NoSQL database.

Resource Type Title
🎞 Video .NET Conf: EF Core 6 and Azure Cosmos DB
🎞 Video Azure Cosmos DB and EF Core
🎞 Video Cosmos Live TV: What’s New with EF Core 6 for Cosmos DB
🎞 Video On .NET: Working with EF Core and Azure Cosmos DB
📃 Official Docs Cosmos Provider Enhancements

Compiled Models

EF Core parses configuration information to build a working model of how the domain maps to the underlying database. The time it takes to compile the memory increases as the number of entities, properties, and relationships grows. Customers with apps in distributed environments or using platforms like Azure Functions require fast startup times. Compiled models addresses this by building the model at development time, significantly improve the time to first query result.

Resource Type Title
🎞 Video Introducing EF Core Compiled Models
📖 Blog Post Compiled Models
📃 Official Docs Compiled Models

Configure Conventions

Imagine you want to impose a string column length limit of 200 characters on every table in your database. If you have hundreds of entities, this would require either applying data annotations or performing fluent configuration for every table. Pre-configuration conventions allow you to specify a rule as a convention that becomes the default unless you opt-out. This can potentially save hundreds of lines of code and allows you to make changes in a single place.

Resource Type Title
📖 Blog Post Configure Conventions
📃 Official Docs Pre-convention Model Configuration

Migration Bundles

A popular feature of EF Core is the ability to track schema changes by version for your database. This capability is called migrations. Traditionally, migrations are embedded in your target application. They would require you to deploy the app along with the .NET SDKs and runtime to execute. To simplify this step as a part of continuous deployment, the EF Core team built migration bundles. These are self-contained, standalone executables that apply the migrations as part of your CI/CD pipeline.

Resource Type Title
📖 Blog Post Introducing DevOps-friendly EF Core Migration Bundles
📃 Official Docs Migration Bundles

Performance

The team’s aggressive focus on performance resulted in a 92% improvement for the full stack of EF Core 6 on .NET 6 over EF Core 5 on .NET 5 according to the industry standard TechEmpower benchmark.

Resource Type Title
🎞 Video Visualizing Database Query Plans
🎞 Video Performance Tuning an EF Core Application
📖 Blog Post EF Core Performance
📃 Official Docs Improved Performance on TechEmpower Fortunes

Temporal Tables

SQL Server supports temporal tables. This is an audit mechanism that tracks every change to a database table and exposes it in a queryable format. EF Core recently added first class support to create, query, and even restore entries from temporal tables.

Resource Type Title
🎞 Video SQL Server Temporal Tables and EF Core 6
📖 Blog Post Prime your flux capacitor: SQL Server temporal tables in EF Core 6
📃 Official Docs SQL Server Temporal Tables

GraphQL

The team focused on the GraphQL experience and although there aren’t specific changes in EF Core 6.0 related to GraphQL, here are some resources that show how well the two technologies work together.

Resource Type Title
🎞 Video Modern Data APIs with EF Core and GraphQL
🎞 Video GraphQL with EF Core 6 and HotChocolate 12

Packages

The EF Core packages for EF Core 6 include:

We have also published the 6.0.0 release of the Microsoft.Data.Sqlite.Core ADO.NET provider.

Installing dotnet ef

To execute EF Core migration or scaffolding commands, you’ll have to install the EF Tools package as either a global or local tool.

EF Tool

If you already installed a previous version of the tool, update it with

dotnet tool update --global dotnet-ef

If this is your first time installing the tool, use:

dotnet tool install --global dotnet-ef

It’s possible to use this new version of dotnet ef with projects that use older versions of the EF Core runtime. For more information on the tool, read: Get the Entity Framwork Core Tools.

Conclusion

Speed. Performance. Improved capabilities across the board. This version of EF Core 6.0 is optimized to work on your platform of choice and connect to your database of choice. Accelerate your development and speed up your performance and make the move to EF Core 6.0!

The post Get to Know EF Core 6 appeared first on .NET Blog.



source https://devblogs.microsoft.com/dotnet/get-to-know-ef-core-6/

NoSQL Database Tutorial – Full Course for Beginners


Curriculum for the course NoSQL Database Tutorial – Full Course for Beginners

In this NoSQL course, Ania Kubow will be demystifying what NoSQL is, clarify the difference between SQL and NoSQL, as well as going into a deep dive of the 4 main types of NoSQL Databases. With each dive we will be approaching each learning as an ‘explanation’, ‘example’ and ‘exercise’. So the 3 E’s, in order to fully grasp the topic we are discussing. We will finish off with 2 projects for using NoSQL databases as well as guidance on where to go next. 🎉 Thanks to DataStax for providing a grant that made this course possible. 🔗 Register for a free Astra DB account to use for this tutorial: https://astra.datastax.com/register/v11/introtonosql ✏️ Ania Kubow’s channel: https://www.youtube.com/aniakubow ⭐️ Course Contents ⭐️ ⌨️ (0:00:00) Introduction ⌨️ (0:01:18) What is NoSQL? ⌨️ (0:04:33) Why use noSQL? ⌨️ (0:06:26) SQL vs NoSQL ⌨️ (0:09:00) Setting Up ⌨️ (0:13:44) Tabular Type ⌨️ (0:37:28) Document Type ⌨️ (0:59:22) Key-value Type ⌨️ (0:01:11) Graph Type ⌨️ (0:01:22) Multi-model Type explained ⌨️ (1:23:52) Project 1 ⌨️ (2:19:36) Project 2 ⌨️ (2:53:51) Where to go next ⭐️ Links ⭐️ 🔗 DataStax Astra DB: https://www.datastax.com/ 🔗 DataStax Enterprise Graph: https://www.datastax.com/products/datastax-graph 🔗 HTTP Status Dogs: https://httpstatusdogs.com/ 🔗 Graph Database Demo: https://github.com/datastaxdevs/workshop-introduction-to-nosql 🔗 Project 1: https://github.com/kubowania/burger-app 🔗 Project 2: https://github.com/kubowania/hotel-app 🔗 Tik Tok Clone using Document SDK: https://www.youtube.com/watch?v=IATOicvih5A 🔗 Netflix Clone with GQL Pagination: https://www.youtube.com/watch?v=g8COh40v2jU 🔗 GraphQL Federation Crypto App: https://www.youtube.com/watch?v=T722_t-HTFw 🎉 Thanks to our Champion and Sponsor supporters: 👾 Wong Voon jinq 👾 hexploitation 👾 Katia Moran 👾 BlckPhantom 👾 Nick Raker 👾 Otis Morgan 👾 DeezMaster 👾 Treehouse 👾 AppWrite -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

Watch Online Full Course: NoSQL Database Tutorial – Full Course for Beginners


Click Here to watch on Youtube: NoSQL Database Tutorial – Full Course for Beginners


This video is first published on youtube via freecodecamp. If Video does not appear here, you can watch this on Youtube always.


Udemy NoSQL Database Tutorial – Full Course for Beginners courses free download, Plurasight NoSQL Database Tutorial – Full Course for Beginners courses free download, Linda NoSQL Database Tutorial – Full Course for Beginners courses free download, Coursera NoSQL Database Tutorial – Full Course for Beginners course download free, Brad Hussey udemy course free, free programming full course download, full course with project files, Download full project free, College major project download, CS major project idea, EC major project idea, clone projects download free

Data Analysis with Python for Excel Users - Full Course


Curriculum for the course Data Analysis with Python for Excel Users - Full Course

Learn how to use Python and Pandas for data analysis. This course will be especially helpful if you have experience with Excel, but that is not required. Learn how to create pivot tables, work with data, and make visualizations using Python, Pandas, and Jupyter Notebook. 💻 Source Code & Datasets: https://github.com/ifrankandrade/python-course-for-excel-users 🔗 Datasets: https://drive.google.com/drive/folders/12hFh6RPlX5bWzSqpoMvAeT94RCjCvHw5?usp=sharing ✏️ Course developed by Frank Andrade. 🔗 YouTube Channel: https://www.youtube.com/c/FrankAndrade5 🔗 PDF Python Cheat Sheet for this Course: https://frankandrade.ck.page/d3b1761715 🔗 My Complete Python Courses for Data Analysis & Data Science: https://www.udemy.com/user/frank-andrade-13/ ⭐️ Course Contents ⭐️ ⌨️ (0:00:00) Intro ⌨️ (0:01:48) Install Python and Jupyter Notebook with Anaconda ⌨️ (0:03:53) Jupyter Notebook Interface ⌨️ (0:13:56) Cell Types and Cell Mode ⌨️ (0:21:34) Jupyter Notebook Shortcuts ⌨️ (0:26:39) Module 1 - Hello World ⌨️ (0:30:30) Data Type ⌨️ (0:39:10) Variables ⌨️ (0:46:53) Lists ⌨️ (1:11:14) Dictionaries ⌨️ (1:21:50) IF Statement ⌨️ (1:28:04) FOR Loop ⌨️ (1:33:49) Functions ⌨️ (1:40:59) Modules ⌨️ (1:44:41) Module 2 -Introduction to Pandas ⌨️ (1:51:08) How to create a dataframe ⌨️ (2:07:34) How to show a dataframe ⌨️ (2:14:24) Basic Attributes, Functions and Methods ⌨️ (2:26:17) Selecting One Column from a Dataframe ⌨️ (2:32:13) Selecting Two or More Columns from a Dataframe ⌨️ (2:37:50) Add New Column to a Dataframe (Simple Assignment) ⌨️ (2:47:51) Operations in dataframes ⌨️ (2:56:04) The value_counts() method ⌨️ (3:00:16) Sort a DataFrame with the sort_values() method ⌨️ (3:09:56) Module 3: Introduction to Pivot Tables in Pandas ⌨️ (3:14:42) The pivot() method ⌨️ (3:20:49) The pivot_table() method ⌨️ (3:29:00) Data Visualization with Pandas (New Dataset + Pivot Table) ⌨️ (3:38:38) Lineplot ⌨️ (3:43:05) Barplot ⌨️ (3:50:52) Piechart ⌨️ (3:54:36) Save Plot and Export Pivot Table 🎉 Thanks to our Champion and Sponsor supporters: 👾 Wong Voon jinq 👾 hexploitation 👾 Katia Moran 👾 BlckPhantom 👾 Nick Raker 👾 Otis Morgan 👾 DeezMaster 👾 AppWrite -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

Watch Online Full Course: Data Analysis with Python for Excel Users - Full Course


Click Here to watch on Youtube: Data Analysis with Python for Excel Users - Full Course


This video is first published on youtube via freecodecamp. If Video does not appear here, you can watch this on Youtube always.


Udemy Data Analysis with Python for Excel Users - Full Course courses free download, Plurasight Data Analysis with Python for Excel Users - Full Course courses free download, Linda Data Analysis with Python for Excel Users - Full Course courses free download, Coursera Data Analysis with Python for Excel Users - Full Course course download free, Brad Hussey udemy course free, free programming full course download, full course with project files, Download full project free, College major project download, CS major project idea, EC major project idea, clone projects download free

What is Feature Toggle - Best Practices, React, Unleash & Custom Software Implementation

Feature Toggle

Frederick Osburgh from Unleashed explains how feature toggles can improve the workflow of development teams and lead to quicker software delivery. Feature toggles allow for the easy activation or deactivation of specific features in a software application. Frederick Osburgh started exploring feature toggling in 2014 because he deeply cared about development proficiency and wanted to release software more frequently. Trunk-based development is a popular technique where developers mainly work on the main branch instead of using long-running feature branches. Feature toggles are used in trunk-based development to wrap new code so that it's not exposed until it's ready.

Using feature toggles allows for early testing in production, verifying new features before they are fully completed. There can be drawbacks to using feature toggles, such as technical debt and increased complexity in testing multiple toggle states. Open-source solutions like Unleash provide flexibility and allow for integration testing with pre-configured toggle states.

What is Feature Toggle - Best Practices, React, Unleash & Custom Software Implementation

Implementing Feature Toggles

Frederick demonstrates how to implement a basic feature toggle in the Free Code Camp codebase.

  • A feature toggle is an if/else statement that determines whether a certain component or functionality should be rendered based on a flag value.
  • By creating a constant flag variable (newDesignOn), we can easily toggle the new design on or off by changing its value (initially set to false).
  • Conditional rendering is used to display either the new landing page component or the old landing page component based on the flag value (newDesignOn).
  • The universal navigation header can also be conditionally rendered based on the flag value.
  • By toggling the flag, developers can easily switch between the new and old designs without modifying the codebase extensively.

Conclusion

Frederick concludes by emphasizing the benefits of feature toggles and trunk-based development.

  • Feature toggles allow for safe and frequent releases in smaller chunks, enabling faster feedback and accelerated learning.
  • While there are drawbacks to using feature toggles, such as technical debt and increased testing complexity, they can be managed

Setting the Flag to True

  • The flag in the code is flipped to true, allowing control over which component is shown.

Goal of Quick Merging and Production Deployment

  • The goal is to quickly merge changes into the master branch and deploy them into production.
  • The feature can be hidden from users until it's 100% complete.

Brittle Nature of Current Flag Implementation

  • The current flag implementation is brittle and requires conscious management.
  • Forgetting to turn off the flag can lead to unfinished features being pushed to production.

Making the Flag More Dynamic

  • Using process environment variables, the flag can be made more dynamic.
  • By setting a specific environment variable value, different configurations can be applied.

Pitfalls of Having Flags in Code

  • Risks include forgetting to turn off flags after development or accidentally pushing unfinished features.
  • External configuration allows toggling without redeploying code.

Moving Flag Configuration to an External Service

  • Using JSONbin, a cloud-based service for hosting JSON configurations, allows external control of feature toggles.
  • A new design configuration with default values is created on JSONbin.

Retrieving Configuration and Passing It Down

  • The configuration is fetched from JSONbin and used to update the state.
  • The configuration is passed down to components that need it, such as the header and landing page.

Updating Configuration Dynamically

  • An interval is set up to refetch the configuration every five seconds.
  • The latest configuration is retrieved by

Vigilance in Working with Feature Toggles

  • When working with feature toggles, it is important to be vigilant and ensure proper management.
  • The implemented functionality of feature toggles can be powerful but also limiting.
  • Certain users may need access to the feature in production, requiring careful rollout and metrics tracking.
  • Connecting multiple applications in different programming languages may require writing custom bindings or considering third-party solutions.

Considering Vendors for Feature Toggles

  • Investing hours into developing a homegrown solution may not be the most efficient approach.
  • There are paid and free alternatives available for feature toggles, such as LaunchDarkly, Split.io, GitLab, Rollout.io, etc.
  • Choosing a vendor depends on individual needs and preferences.
  • It is important to consider the development philosophy of a vendor and ensure it aligns with your own.

Importance of Vendor Selection

  • Maintaining self-developed code requires continuous effort over time.
  • Every line of code written needs to be maintained and updated as needed.
  • Looking for a vendor can provide more robust solutions that save time and effort in the long run.

Development Philosophy at Unleash

  • Unleash is an open-source product with 95% of its code freely available on GitHub.
  • Privacy is strongly emphasized, ensuring data remains within the user's ecosystem.
  • Flexibility is key to success in today's development climate. Developers like to see how things work and feel in control.

Unleash Architecture Overview

  • Unleash utilizes SDKs (Software Developer Kits) for connecting to the Unleash API.
  • The Unleash API is split into Admin API and Client API, serving different purposes.
  • The Unleash Proxy provides an added security layer and improved performance by handling server-to-server communication.

Feature Toggle Strategy Overview

  • 75% of the user base is included in the strategy.
  • The environment needs to be enabled for a strategy to be executed.
  • Setting a strategy in the project allows all feature toggles access to specific environments.
  • Strategies can be used to turn on or off an environment or a feature toggle.

Turning On Environments

  • Turning on an environment allows strategies in that environment to execute.
  • This is different from setting it in the project, which gives all feature toggles access to the environments.

Testing the Proxy

  • Calling against the proxy shows that the page toggle and feature toggle are returned based on the strategy execution percentage.

Fetching Configuration from Development Environment

  • The API token specifies which environment's configuration should be fetched by including it as part of the token.

Implementing Feature Toggles in a Real Application

  • Moving a component into a create react app project for easier development.
  • Using a feature toggle to turn on and off components within the application.

Conditional Rendering Based on Feature Toggle

  • A conditional render component renders different components based on a condition given.
  • The condition can be controlled by a feature toggle.

Creating a Feature Toggle

  • Creating a new feature toggle called "chatbots" in the Unleash instance.
  • Adding a gradual rollout strategy to the development environment.

Connecting Application to Unleash Proxy

  • Using the unleash proxy client for React to connect the application to Unleash.

Adding Remote Address Property

  • A remote address property is added with the IP address.
  • Access via the remote address strategy is demonstrated.
  • The feature is accessed when the IP address matches the value.

Focusing on Experimentation

  • Developers often want to develop different versions of a feature and try them out.
  • Experimentation and A/B testing are powerful tools to determine which version performs better.
  • Unleash allows for experimentation and integration with analytics providers.

Working with Other Services

  • Unleash focuses on providing integration points and flexibility rather than implementing built-in analytics.
  • Users can combine Unleash with their preferred analytics provider for analysis.

A/B Testing with Unleash

  • Variants are introduced in Unleash for A/B testing.
  • Variants have weight distributions that determine the percentage of users assigned to each variant.
  • Code implementation is shown, including rendering different components based on variants.

Implementing Google Analytics Integration

  • React Google Analytics package is installed and initialized.
  • User ID is passed as a parameter for tracking events in Google Analytics.
  • Events can be sent to track user interactions based on variants.

Monitoring and Cleaning Up Feature Toggles

  • Unleash provides a health dashboard to monitor feature toggles.
  • The dashboard shows toggle usage, last seen, and expiration information.
  • It helps identify toggles that can be cleaned up to reduce technical debt.

Metrics and Monitoring in Unleash

  • Metrics can be used to verify the expected behavior of gradual rollouts or strategy configurations.
  • Live updates show the percentage of users getting access to a feature

Feature Toggles - Why and How to Add to Your Software Application

Learn ASP.NET Core MVC (.NET 6) - Full Course


Curriculum for the course Learn ASP.NET Core MVC (.NET 6) - Full Course

Learn the basics of .NET Core (.NET 6) and then build a simple CRUD application with MVC in this tutorial. ✏️ Course developed by Bhrugen Patel. More courses from Bhrugen: https://dotnetmastery.com/ 💻 Code: https://github.com/bhrugen/Bulky/tree/3d83a49c70ebf3ed043e9415a0dcd782f62f5bf7 ⭐️ Course Contents ⭐️ Section 1: Introduction ⌨️ (0:00:00) Welcome ⌨️ (0:02:22) Live Preview ⌨️ (0:04:10) Tools Needed ⌨️ (0:05:17) Introduction to .Net Core ⌨️ (0:10:00) Dependency injection ⌨️ (0:14:34) Create Project ⌨️ (0:17:47) Project File ⌨️ (0:19:23) Launch settings ⌨️ (0:24:35) Programs ⌨️ (0:30:24) MVC Architecture ⌨️ (0:35:13) Routing Overview ⌨️ (0:45:58) Routing in Action ⌨️ (0:36:45) Default Views ⌨️ (0:52:02) Tag Helper ⌨️ (0:54:40) Action Result ⌨️ (0:58:18) Hot Reload Section 2: Database Setup ⌨️ (1:02:10) Create Category Model ⌨️ (1:06:45) Add Data Annotations ⌨️ (1:08:40) Add Connection String ⌨️ (1:14:21) Add ApplicationDbContext ⌨️ (1:21:35) Setup Program.cs to use DbContext ⌨️ (1:26:07) Check Database Section 3: Category CRUD Operations ⌨️ (1:33:19) Create Category Controller ⌨️ (1:37:50) Retrieve all Categories ⌨️ (1:43:55) Display all Categories ⌨️ (1:48:46) Bootswatch Theme ⌨️ (1:54:43) Bootstrap Icons ⌨️ (1:59:03) Create Category View ⌨️ (2:05:57) Demo- Create Category ⌨️ (2:10:40) Server Side Validation ⌨️ (2:15:13) Custom Validation ⌨️ (2:18:56) Add Client Side Validation ⌨️ (2:21:28) Display Name and Range Validation ⌨️ (2:24:43) Edit Category - GET ⌨️ (2:32:59) Edit Category - POST ⌨️ (2:35:54) Delete Category ⌨️ (2:41:36) Tempdata ⌨️ (2:45:10) Partial views ⌨️ (2:47:17) Toastr Alerts ⌨️ (2:51:07) Scaffold CRUD ⌨️ (2:54:20) Create SQL Database on Azure ⌨️ (3:03:35) Azure Deployment ⌨️ (3:07:27) Congratulations 🎉 Thanks to our Champion and Sponsor supporters: 👾 Wong Voon jinq 👾 hexploitation 👾 Katia Moran 👾 BlckPhantom 👾 Nick Raker 👾 Otis Morgan 👾 DeezMaster 👾 AppWrite -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

Watch Online Full Course: Learn ASP.NET Core MVC (.NET 6) - Full Course


Click Here to watch on Youtube: Learn ASP.NET Core MVC (.NET 6) - Full Course


This video is first published on youtube via freecodecamp. If Video does not appear here, you can watch this on Youtube always.


Udemy Learn ASP.NET Core MVC (.NET 6) - Full Course courses free download, Plurasight Learn ASP.NET Core MVC (.NET 6) - Full Course courses free download, Linda Learn ASP.NET Core MVC (.NET 6) - Full Course courses free download, Coursera Learn ASP.NET Core MVC (.NET 6) - Full Course course download free, Brad Hussey udemy course free, free programming full course download, full course with project files, Download full project free, College major project download, CS major project idea, EC major project idea, clone projects download free

Infer# v1.2: Interprocedural Memory Safety Analysis For C#

Last December, we announced the public preview release of Infer#, which brings the interprocedural static analysis of Infer to the .NET community. The project was open sourced on GitHub under an MIT license.

New Feature Highlights

Infer# 1.2 brings race condition detection, improves performance, provides more ways to use, and expands analysis coverage. The full list of improvements can be found on the release page.

Support for Infer# On Windows via WSL2 (Windows Subsystem for Linux)

As the first step in our initiative to provide Windows support for Infer#, you can now run the analysis in WSL2.

Azure Pipelines Integration

We now support Infer# as an Azure Pipelines plugin.

Race Condition

Infer# now supports race condition detection via Infer’s RacerD analyzer.

public class RaceCondition
{
    private readonly object _object = new object();

    public void TestMethod()
    {
        int FirstLocal;
        FirstLocal = TestClass.StaticIntegerField;
    }

    public void FieldWrite()
    {
        lock (_object)
        {
            {
                TestClass.StaticIntegerField = 1;
            }
        }
    }
}
Assets/RaceCondition.cs:12: warning: Thread Safety Violation
  Read/Write race. Non-private method `RaceCondition.TestMethod()` reads without synchronization from `Assets.TestClass.Cilsil.Test.Assets.TestClass.StaticIntegerField`. Potentially races with write in method `RaceCondition.FieldWrite()`.
 Reporting because another access to the same memory occurs on a background thread, although this access may not.

Exception Code Coverage

Infer# now reports warnings on methods with exception-handling constructs (for example, try-catch-finally, and lock).

public void ResourceLeakExcepHandlingBad() {
    StreamWriter stream = AllocateStreamWriter();
    try
    {
        stream.WriteLine(12);
    }
    catch
    {
        console.log("Fail to write");
    }
    finally
    {
        // FIXME: should close the stream by calling stream.Close().
    }
}
/.../Examples/Program.cs:39: error: Dotnet Resource Leak
  Leaked { %0 -> 1 } resource(s) at type(s) System.IO.StreamWriter.

Using Infer#

You can find the instructions for all supported scenarios on our GitHub landing page.

Please submit your feedback and feature requests to our GitHub repository. We’re looking at all feature requests from the community and will prioritize next steps based on popularity.

The post Infer# v1.2: Interprocedural Memory Safety Analysis For C# appeared first on .NET Blog.



Infer# v1.2: Interprocedural Memory Safety Analysis For C#

Last December, we announced the public preview release of Infer#, which brings the interprocedural static analysis of Infer to the .NET community. The project was open sourced on GitHub under an MIT license.

New Feature Highlights

Infer# 1.2 brings race condition detection, improves performance, provides more ways to use, and expands analysis coverage. The full list of improvements can be found on the release page.

Support for Infer# On Windows via WSL2 (Windows Subsystem for Linux)

As the first step in our initiative to provide Windows support for Infer#, you can now run the analysis in WSL2.

Azure Pipelines Integration

We now support Infer# as an Azure Pipelines plugin.

Race Condition

Infer# now supports race condition detection via Infer’s RacerD analyzer.

public class RaceCondition
{
    private readonly object _object = new object();

    public void TestMethod()
    {
        int FirstLocal;
        FirstLocal = TestClass.StaticIntegerField;
    }

    public void FieldWrite()
    {
        lock (_object)
        {
            {
                TestClass.StaticIntegerField = 1;
            }
        }
    }
}
Assets/RaceCondition.cs:12: warning: Thread Safety Violation
  Read/Write race. Non-private method `RaceCondition.TestMethod()` reads without synchronization from `Assets.TestClass.Cilsil.Test.Assets.TestClass.StaticIntegerField`. Potentially races with write in method `RaceCondition.FieldWrite()`.
 Reporting because another access to the same memory occurs on a background thread, although this access may not.

Exception Code Coverage

Infer# now reports warnings on methods with exception-handling constructs (for example, try-catch-finally, and lock).

public void ResourceLeakExcepHandlingBad() {
    StreamWriter stream = AllocateStreamWriter();
    try
    {
        stream.WriteLine(12);
    }
    catch
    {
        console.log("Fail to write");
    }
    finally
    {
        // FIXME: should close the stream by calling stream.Close().
    }
}
/.../Examples/Program.cs:39: error: Dotnet Resource Leak
  Leaked { %0 -> 1 } resource(s) at type(s) System.IO.StreamWriter.

Using Infer#

You can find the instructions for all supported scenarios on our GitHub landing page.

Please submit your feedback and feature requests to our GitHub repository. We’re looking at all feature requests from the community and will prioritize next steps based on popularity.

The post Infer# v1.2: Interprocedural Memory Safety Analysis For C# appeared first on .NET Blog.



source https://devblogs.microsoft.com/dotnet/infer-v1-2-interprocedural-memory-safety-analysis-for-c/

Advanced Git Tutorial - Interactive Rebase, Cherry-Picking, Reflog, Submodules and more


Curriculum for the course Advanced Git Tutorial - Interactive Rebase, Cherry-Picking, Reflog, Submodules and more

Git has so much more to offer than just "commit, pull, push"! Its advanced tools can help you become more productive and professional with your code base. We're going to look at concepts like Interactive Rebase, Cherry-Picking, and Submodules to get you one step closer on your journey to mastering Git! ✏️ This course was created by Tobias Günther from Tower. Tower creates a powerful Git desktop GUI for Mac and Windows. You can download it here: https://www.git-tower.com Note: This course focuses on using Git with the command line. You do NOT need Tower or any other GUI software to follow along. ⭐️ Course Contents ⭐️ ⌨️ (00:00) Introduction ⌨️ (00:51) Hosted by Tower ⌨️ (01:23) Interactive Rebase ⌨️ (08:54) Cherry-Picking ⌨️ (12:10) Reflog ⌨️ (18:42) Submodules ⌨️ (29:30) Search & Find ⌨️ (33:26) The Advanced Git Kit: a collection of short videos about interesting Git topics like Submodules, Interactive Rebase, Cherry-Picking... free to download (www.bit.ly/advanced-git-kit) 🎉 Thanks to our Champion and Sponsor supporters: 👾 Wong Voon jinq 👾 hexploitation 👾 Katia Moran 👾 BlckPhantom 👾 Nick Raker 👾 Otis Morgan 👾 DeezMaster 👾 AppWrite -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

Watch Online Full Course: Advanced Git Tutorial - Interactive Rebase, Cherry-Picking, Reflog, Submodules and more


Click Here to watch on Youtube: Advanced Git Tutorial - Interactive Rebase, Cherry-Picking, Reflog, Submodules and more


This video is first published on youtube via freecodecamp. If Video does not appear here, you can watch this on Youtube always.


Udemy Advanced Git Tutorial - Interactive Rebase, Cherry-Picking, Reflog, Submodules and more courses free download, Plurasight Advanced Git Tutorial - Interactive Rebase, Cherry-Picking, Reflog, Submodules and more courses free download, Linda Advanced Git Tutorial - Interactive Rebase, Cherry-Picking, Reflog, Submodules and more courses free download, Coursera Advanced Git Tutorial - Interactive Rebase, Cherry-Picking, Reflog, Submodules and more course download free, Brad Hussey udemy course free, free programming full course download, full course with project files, Download full project free, College major project download, CS major project idea, EC major project idea, clone projects download free

AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam!


Curriculum for the course AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam!

Prepare for the AWS Certified Cloud Practitioner Certification and pass! Get your Free Practice and Downloadable Cheatsheets 🎁 https://www.exampro.co/clf-c01 📢 [View this course updates!](https://www.exampro.co/clf-c01) Last Updated: Nov 15 2021 ✏️ Developed by Andrew Brown of ExamPro 🔗 https://twitter.com/andrewbrown ⭐️ Course Contents ⭐️ ⌨️ (00:13:10) Introduction ⌨️ (00:17:35) Cloud Concepts ⌨️ (00:46:56) Getting Started ⌨️ (01:19:37) Digital Transformation ⌨️ (01:27:40) The Benefits of the Cloud ⌨️ (01:33:54) Global Infrastructure ⌨️ (02:14:28) Cloud Architecture ⌨️ (02:37:50) Management and Developers Tools ⌨️ (04:15:23) Shared Responsibility Model ⌨️ (04:34:20) Compute ⌨️ (05:27:48) Storage ⌨️ (06:05:26) Databases ⌨️ (06:35:39) Networking ⌨️ (06:57:27) EC2 ⌨️ (07:49:10) EC2 Pricing Models ⌨️ (08:08:09) Identity ⌨️ (08:53:55) Application Integration ⌨️ (09:05:22) Containers ⌨️ (09:16:11) Goverance ⌨️ (09:44:39) Provisioning ⌨️ (10:05:34) Serverless ⌨️ (10:10:04) Windows on AWS ⌨️ (10:18:46) Logging ⌨️ (10:32:39) ML AI BigData ⌨️ (10:52:52) AWS Well Architected Framework ⌨️ (11:14:35) TCO and Migration ⌨️ (11:30:41) Billing and Pricing ⌨️ (12:25:50) Security ⌨️ (13:11:08) Variation Study 🎉 Thanks to our Champion and Sponsor supporters: 👾 Wong Voon jinq 👾 hexploitation 👾 Katia Moran 👾 BlckPhantom 👾 Nick Raker 👾 Otis Morgan 👾 DeezMaster 👾 AppWrite -- Learn to code for free and get a developer job: https://www.freecodecamp.org Read hundreds of articles on programming: https://freecodecamp.org/news And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

Watch Online Full Course: AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam!


Click Here to watch on Youtube: AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam!


This video is first published on youtube via freecodecamp. If Video does not appear here, you can watch this on Youtube always.


Udemy AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam! courses free download, Plurasight AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam! courses free download, Linda AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam! courses free download, Coursera AWS Certified Cloud Practitioner Certification Course (CLF-C01) - Pass the Exam! course download free, Brad Hussey udemy course free, free programming full course download, full course with project files, Download full project free, College major project download, CS major project idea, EC major project idea, clone projects download free

What’s new in Windows Forms in .NET 6.0

We continue to support and innovate in Windows Forms runtime. Let’s recap what we’ve done in .NET 6.0.

Accessibility improvements and fixes

Accessibility improvements, What’s new in Windows Forms in .NET 6.0

Making Windows Forms applications more accessible to more users is one of the big goals for the team. Building on the momentum we gained in .NET 5.0 timeframe in this release we delivered further improvements, including but not limited to the following:

  • Improved support for assistive technology when using Windows Forms apps. UIA providers enable tools like Narrator and others to interact with the elements of an application. UIA is also often used to create test automation to drive apps. We have now added UIA providers support for the following controls:
    • CheckedListBox
    • LinkLabel
    • Panel
    • ScrollBar
    • TabControl
    • TrackBar
  • Improved Narrator announcements in DataGridView, ErrorProvider and ListView column header controls.
  • Keyboard tooltips for the TabControl’s TabPage and the TreeView’s TreeNode controls.
  • ScrollItem Control Pattern support for ComboBoxItemAccessibleObject.
  • Corrected control types for better support of Text Control Patterns.
  • ExpandCollapse Control Pattern support for the DateTimePicker control.
  • Invoke Control Pattern support for the UpDownButtons component in DomainUpDown and NumericUpDown controls.
  • Improved color contrast in the following controls:
    • CheckedListBox
    • DataGridView
    • Label
    • PropertyGridView
    • ToolStripButton

 

Application bootstrap

In .NET Core 3.0 we started to modernize and rejuvenate Windows Forms. As part of that initiative we changed the default font to Segoe UI, 9f (dotnet/winforms#656), and quickly learned that a great number of things depended on this default font metrics. For example, the designer was no longer a true WYSIWYG, as Visual Studio process is run under .NET Framework 4.7.2 and uses the old default font (Microsoft Sans Serif, 8.25f), and .NET application at runtime uses the new font. This change also made it harder for some customers to migrate their large applications with pixel-perfect layouts. Whilst we had provided migration strategies, applying those across hundreds of forms and controls could be a significant undertaking.

To make it easier to migrate those pixel-perfect apps we introduced a new API (for more details refer to the Application-wide default font post):

void Application.SetDefaultFont(Font font)

However, this API wasn’t sufficient to address the designer’s ability to render forms and controls with the same new font. At the same time, with our sister teams heavily pushing for little code/low ceremony application templates, our Program.cs and its Main() method started looking very dated, and we decided to follow the general .NET trend and trim the boilerplate. Please welcome the new Windows Forms application bootstrap:

class Program
{
    [STAThread]
    static void Main()
    {
        ApplicationConfiguration.Initialize();
        Application.Run(new Form1());
    }
}

ApplicationConfiguration.Initialize() is a source generated API that behind the scenes emits the following calls:

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetDefaultFont(new Font(...));
Application.SetHighDpiMode(HighDpiMode.SystemAware);

The parameters of these calls are configurable via MSBuild properties in csproj or props files. The Windows Forms designer in Visual Studio 2022 is also aware of these properties (for now it only reads the default font), and can show you your application (C#, .NET 6.0 and above) as it would look at runtime:

Application bootstrap. What’s new in Windows Forms in .NET 6.0

(We know, the form in the designer still has that Windows XP look, We’re working on it…)

Please note that Visual Basic handles these application-wide default values differently. In .NET 6.0 Visual Basic introduces a new application event ApplyApplicationDefaults which allows you to define application-wide settings (e.g., HighDpiMode or the default font) in the typical Visual Basic way. The designer support for the default font configured via MSBuild properties is also coming in the near future. For more details head over to the dedicated Visual Basic blog post discussing what’s new in Visual Basic.

 

Template updates

As mentioned above we have updated our C# templates in line with related changes in .NET workloads, Windows Forms templates for C# have been updated to support global using directives, file-scoped namespaces, and nullable reference types. Because a typical Windows Forms app requires a STAThread attribute and consist of multiple types split across multiple files (e.g., Form1.cs and Form1.Designer.cs) the top-level statements are notably absent from the Windows Forms templates. However, the updated templates do include the application bootstrap code.

Templates. What’s new in Windows Forms in .NET 6.0

 

More runtime designers

We have completed porting missing designers and designer-related infrastructure that enable building a general-purpose designer (e.g., a report designer). For more details refer to our earlier announcement.

Tiny Designer by Paolo Foti

If you think we missed a designer that your application depends on, please let us know at our GitHub repository.

 

High DPI and scaling fixes

We’ve been working through the high DPI space with the aim to get Windows Forms applications to correctly support PerMonitorV2 mode out of the box. It is a challenging undertaking, and sadly we couldn’t achieve as much as we’d hoped. Still in this release we made some progress, and we now can:

  • Create controls in the same DPI awarenes as the application
  • Correctly scale ContainerControls and MDI child windows in PerMonitorV2 mode in most scenarios. There are still few specific scenarios (e.g., anchoring) and controls (e.g., MonthCalendar) where the experience remains subpar. Scaling, What’s new in Windows Forms in .NET 6.0

 

Other notable changes

  • New overloads for Control.Invoke() and Control.BeginInvoke() methods that take Action and Func<T> and allow writing more modern and concise code.
  • New Control.IsAncestorSiteInDesignMode API is complimentary to Component.DesignMode, and indicates if one of the ancestors of this control is sited, and that site in design mode. A dedicated blog post exploring this API is coming later, so stay tuned.
  • Windows 11 style default tooltip behavior makes the tooltip remain open when mouse hovers over it, and not disappear automatically. The tooltip can be dismissed by CONTROL or ESCAPE keys.

 

Community contributions

We’d like to call out a few community contributions:

 

Reporting bugs and suggesting features

If you have any comments, suggestions or faced some issues, please let us know! Submit Visual Studio and Designer related issues via Visual Studio Feedback (look for a button in the top right corner in Visual Studio), and Windows Forms runtime related issues at our GitHub repository.

Happy coding!

The post What’s new in Windows Forms in .NET 6.0 appeared first on .NET Blog.



What’s new in Windows Forms in .NET 6.0

We continue to support and innovate in Windows Forms runtime. Let’s recap what we’ve done in .NET 6.0.

Accessibility improvements and fixes

Accessibility improvements, What’s new in Windows Forms in .NET 6.0

Making Windows Forms applications more accessible to more users is one of the big goals for the team. Building on the momentum we gained in .NET 5.0 timeframe in this release we delivered further improvements, including but not limited to the following:

  • Improved support for assistive technology when using Windows Forms apps. UIA providers enable tools like Narrator and others to interact with the elements of an application. UIA is also often used to create test automation to drive apps. We have now added UIA providers support for the following controls:
    • CheckedListBox
    • LinkLabel
    • Panel
    • ScrollBar
    • TabControl
    • TrackBar
  • Improved Narrator announcements in DataGridView, ErrorProvider and ListView column header controls.
  • Keyboard tooltips for the TabControl’s TabPage and the TreeView’s TreeNode controls.
  • ScrollItem Control Pattern support for ComboBoxItemAccessibleObject.
  • Corrected control types for better support of Text Control Patterns.
  • ExpandCollapse Control Pattern support for the DateTimePicker control.
  • Invoke Control Pattern support for the UpDownButtons component in DomainUpDown and NumericUpDown controls.
  • Improved color contrast in the following controls:
    • CheckedListBox
    • DataGridView
    • Label
    • PropertyGridView
    • ToolStripButton

 

Application bootstrap

In .NET Core 3.0 we started to modernize and rejuvenate Windows Forms. As part of that initiative we changed the default font to Segoe UI, 9f (dotnet/winforms#656), and quickly learned that a great number of things depended on this default font metrics. For example, the designer was no longer a true WYSIWYG, as Visual Studio process is run under .NET Framework 4.7.2 and uses the old default font (Microsoft Sans Serif, 8.25f), and .NET application at runtime uses the new font. This change also made it harder for some customers to migrate their large applications with pixel-perfect layouts. Whilst we had provided migration strategies, applying those across hundreds of forms and controls could be a significant undertaking.

To make it easier to migrate those pixel-perfect apps we introduced a new API (for more details refer to the Application-wide default font post):

void Application.SetDefaultFont(Font font)

However, this API wasn’t sufficient to address the designer’s ability to render forms and controls with the same new font. At the same time, with our sister teams heavily pushing for little code/low ceremony application templates, our Program.cs and its Main() method started looking very dated, and we decided to follow the general .NET trend and trim the boilerplate. Please welcome the new Windows Forms application bootstrap:

class Program
{
    [STAThread]
    static void Main()
    {
        ApplicationConfiguration.Initialize();
        Application.Run(new Form1());
    }
}

ApplicationConfiguration.Initialize() is a source generated API that behind the scenes emits the following calls:

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.SetDefaultFont(new Font(...));
Application.SetHighDpiMode(HighDpiMode.SystemAware);

The parameters of these calls are configurable via MSBuild properties in csproj or props files. The Windows Forms designer in Visual Studio 2022 is also aware of these properties (for now it only reads the default font), and can show you your application (C#, .NET 6.0 and above) as it would look at runtime:

Application bootstrap. What’s new in Windows Forms in .NET 6.0

(We know, the form in the designer still has that Windows XP look, We’re working on it…)

Please note that Visual Basic handles these application-wide default values differently. In .NET 6.0 Visual Basic introduces a new application event ApplyApplicationDefaults which allows you to define application-wide settings (e.g., HighDpiMode or the default font) in the typical Visual Basic way. The designer support for the default font configured via MSBuild properties is also coming in the near future. For more details head over to the dedicated Visual Basic blog post discussing what’s new in Visual Basic.

 

Template updates

As mentioned above we have updated our C# templates in line with related changes in .NET workloads, Windows Forms templates for C# have been updated to support global using directives, file-scoped namespaces, and nullable reference types. Because a typical Windows Forms app requires a STAThread attribute and consist of multiple types split across multiple files (e.g., Form1.cs and Form1.Designer.cs) the top-level statements are notably absent from the Windows Forms templates. However, the updated templates do include the application bootstrap code.

Templates. What’s new in Windows Forms in .NET 6.0

 

More runtime designers

We have completed porting missing designers and designer-related infrastructure that enable building a general-purpose designer (e.g., a report designer). For more details refer to our earlier announcement.

Tiny Designer by Paolo Foti

If you think we missed a designer that your application depends on, please let us know at our GitHub repository.

 

High DPI and scaling fixes

We’ve been working through the high DPI space with the aim to get Windows Forms applications to correctly support PerMonitorV2 mode out of the box. It is a challenging undertaking, and sadly we couldn’t achieve as much as we’d hoped. Still in this release we made some progress, and we now can:

  • Create controls in the same DPI awarenes as the application
  • Correctly scale ContainerControls and MDI child windows in PerMonitorV2 mode in most scenarios. There are still few specific scenarios (e.g., anchoring) and controls (e.g., MonthCalendar) where the experience remains subpar. Scaling, What’s new in Windows Forms in .NET 6.0

 

Other notable changes

  • New overloads for Control.Invoke() and Control.BeginInvoke() methods that take Action and Func<T> and allow writing more modern and concise code.
  • New Control.IsAncestorSiteInDesignMode API is complimentary to Component.DesignMode, and indicates if one of the ancestors of this control is sited, and that site in design mode. A dedicated blog post exploring this API is coming later, so stay tuned.
  • Windows 11 style default tooltip behavior makes the tooltip remain open when mouse hovers over it, and not disappear automatically. The tooltip can be dismissed by CONTROL or ESCAPE keys.

 

Community contributions

We’d like to call out a few community contributions:

 

Reporting bugs and suggesting features

If you have any comments, suggestions or faced some issues, please let us know! Submit Visual Studio and Designer related issues via Visual Studio Feedback (look for a button in the top right corner in Visual Studio), and Windows Forms runtime related issues at our GitHub repository.

Happy coding!

The post What’s new in Windows Forms in .NET 6.0 appeared first on .NET Blog.



source https://devblogs.microsoft.com/dotnet/whats-new-in-windows-forms-in-net-6-0/

Azure Active Directory’s gateway is on .NET 6.0!

Azure Active Directory’s gateway service is a reverse proxy that fronts hundreds of services that make up Azure Active Directory (Azure AD). If you’ve used services such as office.com, outlook.com, portal.azure.com or xbox.live.com, then you’ve used Azure AD’s gateway. The gateway provides features such as TLS termination, automatic failovers/retries, geo-proximity routing, throttling, and tarpitting to services in Azure AD. The gateway is present in 54 Azure datacenters worldwide and serves ~185 Billion requests each day. Up until recently, Azure AD’s gateway was running on .NET 5.0. As of September 2021, it’s running on .NET 6.0.

Efficiency gains by moving to .NET 6.0

The below image shows that application CPU utilization dropped by 33% for the same traffic volume after moving to .NET 6.0 on our production fleet.

efficiency

The above meant that our application efficiency went up by 50%. Application efficiency is one of the key metrics we use to measure performance and is defined as

Application efficiency = (Requests per second) / (CPU utilization of application)

Changes made in .NET 6.0 upgrade

Along with the .NET 6.0 upgrade, we made two major changes:

  1. Migrated from IIS to HTTP.sys server. This was made possible by new features in .NET 6.0.
  2. Enabled dynamic PGO (profile-guided optimization). This is a new feature of .NET 6.0.

The following sections will describe each of those changes in more detail.

Migrating from IIS to HTTP.sys server

There are 3 server options to pick from in ASP.NET Core:

  • Kestrel
  • HTTP.sys server
  • IIS

A previous blog post describes why Azure AD gateway chose IIS as the server to run on during our .NET Framework 4.6.2 to .NET Core 3.1 migration. During the .NET 6.0 upgrade, we migrated from IIS to HTTP.sys server. Kestrel was not chosen due to the lack of certain TLS features our service depends on (support is expected by June 2022 in Windows Server 2022).

By migrating from IIS to HTTP.sys server, Azure AD gateway saw the following benefits:

  • A 27% increase in application efficiency.
  • Deterministic queuing model: HTTP.sys server runs on a single-queue system, whereas IIS has an internal queue on top of the HTTP.sys queue. The double-queue system in IIS results in unique performance problems (especially in high concurrency situations, although issues in IIS can potentially be offset by tweaking Windows registry keys such as HKLM:SYSTEM\CurrentControlSet\Services\W3SVC\Performance\ReceiveRequestPending). By removing IIS and moving to a single-queue system on HTTP.sys, queuing issues that arose due to rate mismatches in the double-queue system disappeared as we moved to a deterministic model.
  • Improved deployment and autoscale experience: The move away from IIS simplifies deployment since we no longer need to install/configure IIS and ANCM before starting the website. Additionally, TLS configuration is easier and more resilient as it needs to be specified at just one layer (HTTP.sys) instead of two as it had been with IIS.

The following showcase some of the changes that were made while moving from IIS to HTTP.sys server:

  • TLS renegotiation: Renegotiation provides the ability to do optional client certificate negotiation based on HTTP constructs such as request path.

Example: On IIS, during the initial TLS handshake with the client, the server can be configured to not request a client certificate. However, if the path of the request contains, say “foo”, IIS triggers a TLS renegotiation and requests a client certificate.

The following web.config configuration in IIS is how path based TLS renegotiation is enabled on IIS:

  <location path="foo">
      <system.webServer>
        <security>
          <access sslFlags="Ssl, SslNegotiateCert, SslRequireCert"/>
        </security>
      </system.webServer>
  </location>

In HTTP.sys server hosting (.NET 6.0 and up), the above configuration is expressed in code by calling GetClientCertificateAsync() as below.

  // default renegotiate timeout in http.sys is 120 seconds.
  const int RenegotiateTimeOutInMilliseconds = 120000;
  X509Certificate2 cert = null;
  if (httpContext.Request.Path.StartsWithSegments("foo"))
  {
    if (httpContext.Connection.ClientCertificate == null)
    {
      using (var ct = new CancellationTokenSource(RenegotiateTimeOutInMilliseconds))
      {
        cert = await context.Connection.GetClientCertificateAsync(ct.Token);
      }
    }
  }

In order for GetClientCertificateAsync() to trigger a renegotiation, the following setting should be set in HttpSysOptions

options.ClientCertificateMethod = ClientCertificateMethod.AllowRenegotation;
  • Mapping IIS Server variables:

    • On IIS, TLS information such as CRYPT_PROTOCOL, CRYPT_CIPHER_ALG_ID, CRYPT_KEYEXCHANGE_ALG_ID and CRYPT_HASH_ALG_ID is obtained by IIS Server variables and can be leveraged as shown here.
    • On HTTP.sys server, equivalent information is exposed via ITlsHandshakeFeature’s Protocol, CipherAlgorithm, KeyExchangeAlgorithm and HashAlgorithm respectively.
  • Ability to interpret non-ASCII headers:

The gateway receives millions of headers each day with non-ASCII characters in them and the ability to interpret non-ASCII headers is important. Kestrel and IIS already have this ability, and in .NET 6.0, Latin1 request header encoding was added for HTTP.sys as well. It can be enabled using HttpSysOptions as shown below.

options.UseLatin1RequestHeaders = true;
  • Observability:

In addition to .NET telemetry, the health of a service can be monitored by plugging into a wealth of telemetry exposed by HTTP.sys such as:

Http Service Request Queues\ArrivalRate
Http Service Request Queues\RejectedRequests
Http Service Request Queues\CurrentQueueSize
Http Service Request Queues\MaxQueueItemAge
Http Service Url Groups\ConnectionAttempts
Http Service Url Groups\CurrentConnections

Enabling Dynamic PGO (profile-guided optimization)

Dynamic PGO is one the most exciting features of .NET 6.0! PGO can benefit .NET 6.0 applications by maximizing steady-state performance.

Dynamic PGO is an opt-in feature in .NET 6.0. There are 3 environment variables you need to set to enable dynamic PGO:

  • set DOTNET_TieredPGO=1. This setting leverages the initial Tier0 compilation of methods to observe method behavior. When methods are rejitted at Tier1, the information gathered from the Tier0 executions is used to optimize the Tier1 code. Enabling this switch increased our application efficiency by 8.18% compared to plain .NET 6.0.
  • set DOTNET_TC_QuickJitForLoops=1. This setting enables tiering for methods that contain loops. Enabling this switch (in conjunction with above switch) increased our application efficiency by 10.2% compared to plain .NET 6.0.
  • set DOTNET_ReadyToRun=0. The core libraries that ship with .NET come with ReadyToRun enabled by default. ReadyToRun allows for faster startup because there is less to JIT compile, but this also means code in ReadyToRun images doesn’t go through the Tier0 profiling process which enables dynamic PGO. By disabling ReadyToRun, the .NET libraries also participate in the dynamic PGO process. Setting this switch (in conjunction with the two above) increased our application efficiency by 13.23% compared to plain .NET 6.0.

Learnings

  • There were a few SocketsHttpHandler changes in .NET 6.0 that surfaced as issues in our service. We worked with the .NET team to identify workarounds and improvements.
    • New connection attempts that fail can impact HTTP multiple requests in .NET 6.0, whereas a failed connection attempt would only impact a single HTTP request in .NET 5.0.
      • Workaround : Setting a ConnectTimeout slightly lower than HTTP request timeout ensures .NET 5.0 behavior is maintained. Alternatively, disposing the underlying handler on a failure also ensures only a single request is impacted due to a connect timeout (although this can be expensive depending on the size of the connection pool, please be sure to measure for your scenario).
    • Requests that fail due to RST packets are no longer automatically retried in .NET 6.0 and this results in an elevated rate of An existing connection was forcibly closed by the remote host exceptions bubbling up to the application from HttpClient.
      • Workaround : The application can add retries on top of HttpClient for idempotent requests. Additionally, if RST packets are due to idle timeouts, setting PooledConnectionIdleTimeout to lower than the idle timeout of the server will help eliminate RST packets due to idle connections.
  • HttpContext.RequestAborted.IsCancellationRequested had inconsistent behavior on HTTP.sys compared to other servers and has been fixed in .NET 6.0.
  • Client side disconnects were noisy on HTTP.sys server and there was a race condition that was triggered while trying to set StatusCode on a disconnected request. Both have been fixed in .NET 6.0.

Summary

Every new release of .NET has tremendous performance improvements and there is a huge upside to migrating to the latest version of .NET. For Azure AD gateway, we look forward to trying out newer APIs specific to .NET 6.0 for even bigger wins and further enhancements in .NET 7.0.

The post Azure Active Directory’s gateway is on .NET 6.0! appeared first on .NET Blog.



Share this post

Search This Blog

What's New

The "AI is going to replace devs" hype is over – 22-year dev veteran Jason Lengstorf [Podcast #201]

Image
Curriculum for the course The "AI is going to replace devs" hype is over – 22-year dev veteran Jason Lengstorf [Podcast #201] Today Quincy Larson interviews Jason Lengstorf. He's a college dropout who taught himself programming while building websites for his emo band. 22 years later he's worked as a developer at IBM, Netlify, run his own dev consultancy, and he now runs CodeTV making reality TV shows for developers. We talk about: - How many CEOs over-estimated the impact of AI coding tools and laid off too many devs, whom they're now trying to rehire - Why the developer job market has already rebounded a bit, but will never be the same - Tips for how to land roles in the post-LLM résumé spam job search era - How devs are working to rebuild the fabric of the community through in-person community events Support for this podcast is provided by a grant from AlgoMonster. AlgoMonster is a platform that teaches data structure and algorithm patterns in a structure...

Labels

Programming Video Tutorials Coursera Video Tutorials Plurasight Programming Tutorials Udemy Tutorial C# Microsoft .Net Dot Net Udemy Tutorial, Plurasight Programming Tutorials, Coursera Video Tutorials, Programming Video Tutorials Asp.Net Core Asp.Net Programming AWS Azure GCP How To WordPress Migration C sharp AWS Project Git Commands FREE AWS Tutorial OldNewThings Git Tutorial Azure vs AWS vs GCP New in .Net javascript AI Google I/O 2025 Wordpress jquery Generative Video Git Git Squash Google Flow AI PHP SQL Veo 3 squash commit CSS Cloud Services React Tutorial With Live Project Source Code git rebase CPR Nummer Dropdown Reset Javascript Figma Figma Beginner Tutorial Geolocation Non-Programmer Content Python Free Course Think Simply Awesome Tutorial UI UX Live Project UI/UX Full Course Wireframing dotnet core runtime error html API Gateway AWS EKS vs Azure AKS All in one WP stuck C++ C++ Coroutines CPR Denmark ChatGPT Cloud Database Cloud DevOps Cloud Security Cloud Storage Contact Form 7 Dropdown Unselect Javascript E commerce Free AWS Terraform Project Training Git Commit Google Drive Files Google Drive Tips Http Error 500.30 Http Error 500.31 Interview Questions Learn Courutines C++ Microservices for Live Streaming PII Denmark Pub Sub SQL Server SSIS Terraform Course Free Terraform Tutorial Free USA E commerce strategies UpdraftPlus UpdraftPlus Manual Restore Website Optimization Strategies dropdown javascript select drop down javascript smarttube apk error 403 smarttube next 403 Error 413 Error 503 504 524 AI & ML AI Assistants AI Course CS50 AI in daily life AWS API Gateway AWS EBS AWS EC2 vs Azure VMs vs GCP Compute Engine AWS EFS AWS IAM AWS Lamda AWS RDS vs Azure SQL AWS Redshift AWS S3 AZ-104 AZ-104 Free Course AZ-104 Full Course AZ-104 Pass the exam Abstract Class C# Abstract Method Ajax Calender Control Ajax Control Toolkit All In One Extension Compatibility All In One WP Freeze All In One WP Migration All in one WP All-in-One WP Migration Android 15 Android TV Applying Theme html Asp.net core runtime Error Audio Auto Complete Azure AD Azure APIM Azure Administrator Certification Azure Blob Storage Azure Data Lake Azure Files Azure Function Azure Managed Disk Azure Synapse Base Class Child Class Best Grocery Price Big Data BigBasket vs Grofers Bing Homepage Quiz Blogger Import Blogger Post Import Blogger XML Import Bluetooth Connectivity Browser Detail Building Real-Time Web Applications Bulk Insert CI/CD CPR Address Update CPR Generator CPR Generator Denmark CS50 AI Course CS50 AI Python Course CS50 Artificial Intelligence Full Course CVR Centrale Virksomhedsregister Change Workspace TFS ChatGPT Essay Guide ChatGPT Usage ChatGPT vs Humans Cloud API Management Cloud CDN Cloud Computing Cloud Data Warehouse Cloud Event Streaming Cloud IAM Cloud Messaging Queue Cloud Monitoring and Logging Cloud Networking CloudFront Cloudflare Cloudwatch Compute Services Connect a Bluetooth Device to my PC site:microsoft.com Containers ControlService FAILED 1062 Corona Lockdown MP CosmosDB Covid19 Covid19 Bhopal Covid19 Home Delivery MP Covid19 Indore Covid19 Susner Covid19 Ujjain Cypress Javascript Cypress Javascript framework Cypress Javascript testing Cypress Javascript tutorial Cypress Javascript vs typescript DNS Danish CVR Data Analytics Data Analytics Course Free Data Engineering Data Structure Full Course Data Visualization Database Database Diagram Visualizer Davek Na Dodano Vrednost Dbdiagram export seeder Deep Learning Course Denmark Numbers Det Centrale Personregister Det Centrale Virksomhedsregister DevOps Device Compatibility Dictionary Dictionary in C# Digital Economy Disaster Recovery for Web Applications Disaster-Proof Infrastructure Dmart Frenchise Dmart Home Delibery Dmart Mumbai Address Dmart Pickup Points Doodle Jump Drive Images On Blog Drive Images On Website Driver Problems DropDown Dropbox Dropdown jquery DynamoDB ETL ETL Package Ecommerce Store using AWS & React Embed Drive Images Escape Sequences in c#.Net Event Hub Explicit Join Extract Facebook App Fake CVR Denmark Fake DDV Slovenia Fake VAT Number Fake Virk Number Faker Feature Toggle Find CPR Information Find a Word on Website Firestore Flappy Bird Game Form Selectors using jQuery Free React Portfolio Template FreeCodeCamp Frontend Best Practices for Millions of Users Full Text Index View G Drive Hosting GAN certification course GCP Cloud Data Lake GCP Filestore GCP Functions GCP IAM GCP Persistent Disk Gemini Git Checkout Google Adsense Setting Google Beam Google BigQuery Google Conversion Tracking Google Docs Advanced Tutorial Google Drive Clone Google Drive Clone Bot Google Drive Clone HTML CSS Google Drive Clone PHP Google Drive Clone React Google Drive Clone Tutorial Google Drive Clone VueJS Google Drive File Sharing Google Drive Images Google Drive Sharing Permissions Grocery Price Compare Online Grocery in Corona Grocery in Covid19 Grofers vs DMart vs Big basket HAXM installation HTML Storage HTML to PDF Javascript HTML2Canvas HTML5 HTML5 Append Data HTML5 Audio HTML5 Data Storage HTML5 Storage HTML5 Video Harvard University AI Course Header Sent Height Jquery High Availability in Live Streaming Platforms High-Concurrency Frontend Design High-Concurrency Web Applications How to Search for a Word on Mac Html2Canvas Black Background issue Http Error 413 Http Error 500.35 IIS INNER Join Image Gallery Blogger Image Gallery Blogger Picasa Image Gallery Blogger Template Image Gallery Blogger Template Free Implicit Join Indexing in SQL Instagram Clone React Instagram Clone Script Install NodeJS Ubuntu Internet Infrastructure Interview IoT IoT Core IoT Hub JS Game Tutorial Java Feature Toggle Javascript game tutorial JioCinema Case Study Keep Me Login Key Management Kinesis Learn Scrappy with a live project List Live Streaming Data Delivery Live Streaming Performance Optimization Load Load Balancer Looping Dictionary MTech First Semester Syllabus MTech Syllabus MVC Mac Mac Finder Shortcut Media Controller Media Group Attribute Microservices Architecture for Scalability Missing MySQL Extension Mobile Optimization Multiple Audio Sync Multiple Video Sync Mumbai Dmart List MySQL MySQL ERD Generator Next.js Beginner Tutorial Ngnix NodeJS NodeJS Ubuntu Commands Numpy OOPS Concepts OOPS in C# Object Oriented Programming Object Storage Outer Join PHP Installation Error PHP WordPress Installation Error Pandas Personligt identifikations nummer Pipedrive Pipedrive Quickbooks Integration Portfolio Website using React Project Astra PyTorch Quickbooks Quote Generator RGPV Syllabus Download Random SSN Generator ReCaptcha Dumbass React Feature Toggle Real-Time Video Processing Architecture Real-Time Video Processing Backend RegExp Regular Expression Reinstall Bluetooth Drivers Remember Me Remove NodeJS Ubuntu Renew DHCP Lease Reset IP Address Linux Reset IP Address Mac Reset IP Address Windows Reset Remote Connection Reset Remote Connection Failure Resize Textarea Restore Errors Restore Failed UpdraftPlus Route 53 SOS Phone SQL Indexed Tables SQL Joins SQL Seed generator SQS SSIS Package SSIS Tutorial SSN Generator for Paypal SSN Number SSN Number Generator SSN Validator Safari 8 Safari Video Delay SageMaker Scalable Backend for High Concurrency Scalable Cloud Infrastructure for Live Streaming Scalable Frontend Architectures Scalable Live Streaming Architecture Scrapy course for beginners Search A word Search for a Word in Google Docs Secret Management Serverless Service Bus Slovenian VAT Generator SmartTube Software Architect Interview Questions Software Architect Mock Interview Sparse Checkout Spotlight Mac Shortcut Stored Procedure Subtree Merge T-Mobile IMEI Check TFS TMobile IMEI check unlock Team Foundation Server Terraform Associate Certification Training Free Text Search Text color Textarea Resize Jquery Theme Top WordPress Plugins Transform Trim javascript Troubleshooting TypeScript Beginner Tutorial Ubuntu Unleash Feature Toggle Update Computer Name UpdraftPlus 500 UpdraftPlus Backup Restore UpdraftPlus Error 500 UpdraftPlus Error 504 UpdraftPlus Error 524 UpdraftPlus HTTP Error UpdraftPlus New Domain UpdraftPlus Restore Not Working UpdraftPlus Troubleshooting Upstream Reset Error Use Google Drive Images VAT Number Generator Verizon imei check Verizon imei check paid off Verizon imei check unlock Verizon imei check\ Version Control Vertex AI Video View Indexing SQL Views in SQL Virksomhedsregister Virtual friends Visual Studio 2013 WHERE Clause WHPX expo Web Security Web scraping full course with project Web3 What is Feature Toggle WordPress Backup Troubleshooting WordPress Backup UpdraftPlus WordPress Database Backup WordPress Error 503 WordPress Installation Error WordPress Migration UpdraftPlus Wordpress Restore Workspaces Commands Your ip has been banned Zero Click angle between two points bing homepage quiz answers bing homepage quiz answers today bing homepage quiz not working bing homepage quiz reddit bing homepage quiz today byod Verizon imei check chatgpt essay example chatgpt essay writer chatgpt essay writing check tmobile imei contact form 7 captcha contact form 7 captcha plugin contact form 7 recaptcha v3 cpr-nummer engelsk cpr-nummer liste cpr-nummer register cpr-nummer tjek dbdiagram dom load in javascript dotnet core hosting bundle dotnet failed to load dotnet runtime error get url in php how to search for a word on a page how to search for a word on a page windows ipconfig release is cypress javascript istio transport failure jQuery AutoComplete jQuery Input Selector jQuery Menu jQuery Options joins in mySql jquery selector jquery selectors jsPDF jsPDF images missing key key-value keypress event in jQuery kubernetes upstream error localStorage metro by t-mobile imei check nemid cpr-nummer react native expo setup react native on Windows react native setup recaptcha v3 contact form 7 recaptcha wordpress contact form 7 reset connection failure resize control jQuery response code 403 smarttube round number in javascript select sessionStorage smarttube 403 エラー smarttube apk smarttube beta smarttube download smarttube reddit smarttube unknown source error 403 smartube sos iphone top right sos on iphone 13 sos only iphone substr substr in javascript tmobile imei tmobile imei check paid off tmobile imei number total by Verizon imei check trim trim jquery turn off sos iphone turn off sos on iphone 11 unknown source error 403 unknown source error response code 403 smarttube upstream connect error url in php view hidden files mac finder zuegQmMdy8M ошибка 403 smarttube
  • ()
  • ()
Show more
an "open and free" initiative. Powered by Blogger.