Posts

Showing posts from December, 2024

[MS] Making sure the Microsoft Visual C++ compiler chooses the right source encoding - devamazonaws.blogspot.com

You can tell the Microsoft Visual Studio compiler what encoding to use when reading source files, by means of the /source-charset compiler switch . If you don't specify an encoding, then the compiler tries to guess: If the file begins with a UTF-16 BOM, then the source file is interpreted as UTF-16. If the file begins with a UTF-8 BOM, then the source file is interpreted as UTF-8. Otherwise, the source file is interpreted in the default user code page. These settings are determined by your project configuration, which creates the possibility that they get out of sync with the actual intended file encoding. For C and C++, you can at least assert that the compiler configuration and file encoding match what you intended. That way, if Visual Studio secretly changes the file encoding from CP 1252 to UTF-8, say,¹ you can force a compiler error to alert you that the file encoding is messed up. // If you want to make sure it's CP 1252 static_assert('’' == '\x92...

[MS] Dock the Code Search window in Visual Studio 2022 - devamazonaws.blogspot.com

Image
Ever felt frustrated with the search window cluttering your workspace? The latest feature in Visual Studio 2022 gives you more control over the behavior of the Code and Feature Search window, making your search experience smoother and more efficient. Some users have shared that the search window feels intrusive, interrupting your work by appearing mid-screen or on the wrong screen and taking up precious screen real estate. You now have the option to turn the search window into a tool window and dock it where you’d like. Choose how you want your search window Visual Studio now allows you to dock the search window and perform various tool window actions, like Solution Explorer and other tool windows. The window will continue to pop up by default, but you can now dock, pop out, or auto-hide the search window as a tool window. After launching Code Search (Ctrl+T or Ctrl+,) or Feature Search (Ctrl+Q), click the box icon with an arrow at the top right of the window. This icon transforms th...

Amazon Location Service is now available in AWS Asia Pacific (Malaysia) Region - devamazonaws.blogspot.com

Today, we are announcing the availability of Amazon Location Service in the AWS Asia Pacific (Malaysia) Region. Amazon Location Service is a location-based service that helps developers easily and securely add maps, search places and geocodes, plan routes, and enable device tracking and geofencing capabilities into their applications. With Amazon Location Service, developers can start a new location project or migrate existing mapping service workloads to benefit from cost reduction, privacy protection, and ease of integration with other AWS services. With this launch, Amazon Location Service is now available in the following AWS Regions: US East (N. Virginia), US East (Ohio), US West (Oregon), Europe (Frankfurt), Europe (Ireland), Europe (Stockholm), Asia Pacific (Singapore), Asia Pacific (Sydney), and Asia Pacific (Tokyo), Asia Pacific (Mumbai), Canada (Central), Europe (London), South America (São Paulo), AWS GovCloud (US-West), AWS Europe (Spain), and AWS Asia Pacific (Malaysia)...

[MS] Top .NET Videos & Live Streams of 2024 - devamazonaws.blogspot.com

It has been an absolutely outstanding year of content for .NET from creators around the globe sharing their passion for .NET and the .NET team giving insight into the latest and greatest in the world of .NET. From events, live streams, and plenty of on-demand content dropping on the .NET YouTube nearly every single day, it is a great way to stay up to date, but also get involved and give feedback to the team in real-time. This year, developers tuned into the .NET YouTube more than ever before with over 8 million views of content, left over 6,000 comments, smashed the like button over 120,000 times, and over 50,000 new subscribers joined the channel. There is now more variety of content than ever and that has led to over 700K hours of watch time this year alone! This is over 29,000 days watched or to go even a step further... nearly 80 years! Top .NET videos of 2024 It was fun looking back at this year's top videos as it really was a wide range of content. The most watched video...

[MS] How various git diff viewers represent file encoding changes in pull requests - devamazonaws.blogspot.com

In addition to the git command line tool, there are other tools or services that let you view changes in git history. The most interesting cases are those which present changes as part of a pull request, since those are changes you are reviewing and approving. But a common problem is that what they show you might not be what actually changed. I'll limit my discussion to services and tools I have experience with, which means that it's the git command line, Azure DevOps, GitHub, and Visual Studio. You are welcome to share details for other services that you use, particularly those used for code reviews. First, let's consider a commit that changes the encoding of a file. For concreteness, let's say that the file is this: I just checked. It costs A3 1. where A3 represents a single byte with hex value 0xA3 . This is the representation of £ in the Windows 1252 code page. Suppose you change the encoding of this file to UTF-8: It costs C2 A3 1. If you view this in the c...

[MS] Go to line anywhere with Code Search for Visual Studio 2022 - devamazonaws.blogspot.com

Image
Finding the exact line of code where an issue is occurring can be like searching for a needle in a haystack. Whether you are debugging an error on line 43 of a file or diving into a specific section of code, you can efficiently jump to the right places with this newest addition to Code Search. In Code Search, you can now jump to a specific line in the current file or another file, making it faster and easier to move around your codebase. Navigate to a line in the current document No need to scroll endlessly to find a specific line. With the updated Code Search, you can swiftly jump to any line in the current document by simply typing colon + line number. For example, typing :39 instantly takes you to line 39 in the active file. Navigate to a line in a different document But that's not all! You can also navigate to a specific line in a certain document by appending the file name with a colon and the line number. For instance, entering Order:43 will direct you to line 43 in the ...

Amazon EC2 I7ie instances now available in AWS US East (Ohio), US West (Oregon) regions - devamazonaws.blogspot.com

Amazon Web Services is announcing starting today, Amazon Elastic Compute Cloud (Amazon EC2) I7ie instances are now available in AWS US East (Ohio), US West (Oregon) regions. Designed for large storage I/O intensive workloads, I7ie instances are powered by 5th generation Intel Xeon Scalable processors with an all-core turbo frequency of 3.2 GHz, offering up to 40% better compute performance and 20% better price performance over existing I3en instances. I7ie instances offer up to 120TB local NVMe storage density (highest in the cloud) for storage optimized instances and offer up to twice as many vCPUs and memory compared to prior generation instances. Powered by 3rd generation AWS Nitro SSDs, I7ie instances deliver up to 65% better real-time storage performance, up to 50% lower storage I/O latency, and 65% lower storage I/O latency variability compared to I3en instances. I7ie are high density storage optimized instances, ideal for workloads requiring fast local storage with high random...

[MS] In C++, failure to meet the requirements does not always mean that you fail if you don’t meet the requirements - devamazonaws.blogspot.com

I was asked to help debug a problem where a pointer passed to a function was received slightly offset from the original value. The pointer is passed as an opaque parameter and is supposed to be spit out the other end of a pipeline. But somehow, the value that came out the other end was slightly different. For expository purposes, let's say that the underlying function we're trying to call is this one. void SubmitWork(HWORKER worker, int commandCode, void* param); You call Submit­Work with a worker, a command code, and a raw pointer to some data that depends on the command code. The developer sent me some debugging output that showed that the function that handled the command code received a different pointer from what was passed. One possibility is that there was a bug in the library that resulted in it unintentionally modifying the final pointer parameter, but this seemed unlikely, since the value should be opaque to the library. I was able to get on a video call with the...

[MS] Critical: .NET Install links are changing - devamazonaws.blogspot.com

We are currently making an unexpected change to the way that .NET installers and archives are distributed. This change may affect you and may require changes in your development, CI, and/or production infrastructure. We expect that most users will not be directly affected, however, it is critical that you validate if you are affected and to watch for downtime or other kinds of breakage. The most up-to-date status is being maintained at dotnet/core #9671 . Please look to that issue to stay current. If you are having an outage that you believe is caused by these changes, please comment on the reference GitHub issue and/or email us at dotnet@microsoft.com. Affected domains We maintain multiple Content Delivery Network (CDN) instances for delivering .NET builds. Some end in azureedge.net . These domains are hosted by edg.io , which will soon cease operations due to bankruptcy. We are required to migrate to a new CDN and will be using new domains going forward. It is possible that azure...

Amazon EC2 Im4gn Instances are now available in Europe (Spain) region - devamazonaws.blogspot.com

Starting today, Amazon EC2 Im4gn Instances are available in Europe (Spain) region. Im4gn instances are built on the AWS Nitro System and are powered by AWS Graviton2 processors. They feature up to 30TB of instance storage with the 2nd Generation AWS Nitro SSDs that are custom-designed by AWS to maximize the storage performance of I/O intensive workloads such as SQL/NoSQL databases, search engines, distributed file systems and data analytics which continuously read and write from the SSDs in a sustained manner. AWS Nitro SSDs enable up to 60% lower latency and up to 75% reduced latency variability in Im4gn instances compared to the third generation of storage optimized instances. These instances maximize the number of transactions processed per second (TPS) for I/O intensive workloads such as relational databases (e.g. MySQL, MariaDB, PostgreSQL), and NoSQL databases (KeyDB, ScyllaDB, Cassandra) which have medium-large size data sets and can benefit from high compute performance and hig...

Llama 3.3 70B now available on AWS via Amazon SageMaker JumpStart - devamazonaws.blogspot.com

AWS customers can now access the Llama 3.3 70B model from Meta through Amazon SageMaker JumpStart. The Llama 3.3 70B model balances high performance with computational efficiency. It also delivers output quality comparable to larger Llama versions while requiring significantly fewer resources, making it an excellent choice for cost-effective AI deployments. Llama 3.3 70B features an enhanced attention mechanism that substantially reduces inference costs. Trained on approximately 15 trillion tokens, including web-sourced content and synthetic examples, the model underwent extensive supervised fine-tuning and Reinforcement Learning from Human Feedback (RLHF). This approach aligns outputs more closely with human preferences while maintaining high performance standards. According to Meta, this efficiency gain translates to nearly five times more cost-effective inference operations, making it an attractive option for production deployments. Customers can deploy Llama 3.3 70B through the...

[MS] Why are Win32 resources strings bundled at all? And why bundles of 16? - devamazonaws.blogspot.com

We saw some time ago that strings in Win32 resources are grouped in bundles of 16 . Why not have each string be a separate resource? Why are they bundled at all? And why bundles of 16? Why not 15 or 8 or 32? Recall how resources worked in 16-bit Windows . To load a resource, you allocate a selector to hold the resource data, load the resource data from disk into the selector, and then use the selector to access the resource. The selector remains in memory afterward, but it is marked as "discardable", so that it can be freed when the system comes under memory pressure. Windows 1.0's system requirements did not include a hard drive. You could run it off a two-floppy system.¹ Reducing I/O had a noticeable effect on performance, so issuing a separate I/O for each string was going to be inefficient. On top of that, Windows 1.0 had a limit of 4096 selectors , so putting each string in its own resource would drain the system of selectors. On the other hand, you don't wan...

[MS] How can I check if two GUIDs are equal when they are provided as strings? - devamazonaws.blogspot.com

A customer asked if there was a helper function in the system that accepted two strings and reported whether the GUID s they represent are equal. This is a tricky question, because you first have to decide what "represent" means. There are many ways of representing a GUID as a string. It could be just 32 case-insensitive hexadecimal digits. Or maybe there are internal hyphens to separate the groups. And the whole thing might be enclosed in braces or parentheses. External and interior whitespace might be allowed. Trailing garbage might be accepted (and ignored). And then there's the special format {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}} supported by System.Guid.Parse . That last one is tricky because it means you can't just use a naïve algorithm of just discarding anything that is not a hexadecimal digit. The simplest solution is to pass both strings to a GUID parser that supports the formats that you want to support, then c...

[MS] A design flaw in the Windows 3D Pipes screen saver pointed out by a customer - devamazonaws.blogspot.com

Some time ago, I shared the origin story of the Windows 3D Pipes screen saver . Described as the best screen saver of all time , it was nevertheless not without its issues. A customer complained that they were losing productivity because employees were spending too much time running the 3D Pipes screen saver and waiting for teapots to appear. They requested an option to increase the likelihood of a teapot, so the employees would be placated more quickly and get back to their work. The teapot was a surprise hidden in the 3D Pipes screen saver. Once in a while, a teapot would appear in the joints of the pipes . This was a tribute to the Utah teapot , a standard reference object in the computer graphics industry. I can't find any evidence that this feature request was accepted. If you set the joint mode to "mixed", then each joint has a 1/1000 chance of being a teapot. Prior to Windows NT 4.0, any non-teapot "mixed" joint had a 50/50 chance of being a ball or e...

[MS] Connect securely to your Azure resources - devamazonaws.blogspot.com

Image
Visual Studio 2022's Connected Services features are being updated to help you start secure. In the past, for example with Azure Storage, we’d inject the entire connection string into your configuration. With this update, we’ve removed the secrets from the UX – and from what we save to configuration – altogether. This means your code has fewer secrets in it, so you won’t push those into your source control repository inadvertently. Integrated authentication, by default Prior to this update, Connected Services would inject secret-inclusive connection strings for resources like Azure Storage into your secrets. If you were using secrets.json for local storage, this would result in your secrets being stored in files on disk. After this update, your secrets.json will contain no actual secrets, but rather the Azure Storage endpoints for your service instance. Using the latest Azure SDKs, your code connects to your Azure resources using your Visual Studio or Azure CLI login. Locally,...

Amazon Connect launches support for routing to a specific range of agent proficiencies - devamazonaws.blogspot.com

Amazon Connect now offers the ability to target a range of agent proficiency levels, such as from levels 1 to 3 for French. You can ensure each contact is matched to an agent with the right skill level to handle it, resulting in reduced contact transfers and lower handle times. You can assign simpler contacts to new hires while reserving your tenured agents for the difficult contacts that require their knowledge and expertise. This feature is available in all AWS regions where Amazon Connect is offered. To learn more about routing criteria, see the Amazon Connect Administrator Guide . To learn more about Amazon Connect, the AWS cloud-based contact center, please visit the Amazon Connect website .   Post Updated on December 23, 2024 at 06:00PM

Amazon Connect offers the ability to exclude certain proficiencies during routing - devamazonaws.blogspot.com

Amazon Connect now offers the ability to exclude certain proficiencies from consideration when using routing criteria for routing. You can use this to exclude or reserve niche skills. For example, you can exclude dual-skilled Spanish and English speaking agents from English language contacts to reserve them for contacts in Spanish. You can include the dual-skilled agents when required by removing the exclusion condition. This feature is available in all AWS regions where Amazon Connect is offered. To learn more about routing criteria, see the Amazon Connect Administrator Guide . To learn more about Amazon Connect, the AWS cloud-based contact center, please visit the Amazon Connect website .   Post Updated on December 23, 2024 at 06:00PM

[MS] A common proposed solution to certain categories of IFNDR: Getting the linker to verify identical functions - devamazonaws.blogspot.com

Some time ago, I gave as an example of the C++ concept of ill-formed no diagnostic required (IFNDR) the case of an inline function being compiled with different definitions by different .cpp files . The standard requires that all definitions of an inline function be identical. (There are other things that result in IFNDR, but let's focus on the inline functions for now.) If you violate this rule, then the compiler is not required to tell you that you messed up, and the resulting program is not required to behave in any particular manner. In practice, these problems are difficult for the compiler to diagnose because it requires matching up entities across translation units (.cpp files), and traditionally, the compiler operates only on a single translation unit, so it cannot "see" definitions from other translation units. A common proposal for making this problem diagnosable, at least for the case of inline functions, is to defer the detection to the linker. The compiler...

[MS] Security updates to Azure publishing from Visual Studio - devamazonaws.blogspot.com

Image
Visual Studio 2022 introduces a new feature to improve the security of publishing applications to Azure App Service. This feature is designed to disable Basic Authentication and enable integrated security for a more secure publishing process. Basic Authentication has been identified as a less secure method for managing app deployments. Visual Studio 2022 addresses this issue by offering you an option to disable Basic Authentication, which enhances security by using integrated authentication. The problem with Basic Authentication Basic Authentication involves sending user credentials in a format that is not highly secure, making it vulnerable to interception. This poses a risk to the integrity of applications. Secure publishing with integrated authentication The new feature in Visual Studio 2022 disables Basic Authentication and enables integrated security for publishing to Azure App Service. This ensures that publishing credentials is handled securely, reducing the risks associated ...

[MS] How do I register a file type for a scripting language so that users get a warning when they run an untrusted script? - devamazonaws.blogspot.com

Occasionally we get security reports that go something like this: Install the ContosoScript scripting language interpreter. it uses the file extension .contososcript . Write a script that does ⟦ something malicious ⟧ and put it on a Web site so it can be downloaded. Download the script to your Downloads folder, and then run it by double-clicking it from Explorer. Notice that no warning appears. The ContosoScript interpreter runs the malicious script which ⟦ something malicious ⟧. There are other variations of this report, like putting the malicious script on a malicious file share, but they all boil down to "Nobody stopped me from running this malicious script!" Windows takes several things into consideration when deciding whether a file with a non-local source requires an extra warning before opening. The relevant one here is whether the file extension is considered "dangerous to use with untrusted files." Identifying these dangerous extensions is done by th...

Amazon EKS expands catalog of upgrade insight checks - devamazonaws.blogspot.com

Today, Amazon Elastic Kubernetes Service (EKS) announces new enhancements to upgrade insights, a feature that surfaces cluster configuration issues that may impact your ability to successfully upgrade a cluster to a newer version of Kubernetes. With these new enhancements, EKS upgrade insights will scan and warn on cluster health and version compatibility issues between different Kubernetes and EKS components such as kubelet, kube-proxy and EKS add-ons. Kubernetes is a fast-paced, evolving open source project with 3 releases per year, making upgrades a routine part of running Kubernetes clusters. EKS upgrade insights automatically scan clusters against a list of potential Kubernetes version upgrade impacting issues. EKS periodically updates the list of insight checks to perform, based on evaluations of changes in the Kubernetes project, as well as changes introduced in the EKS service along with new versions. EKS upgrade insights surface issues and provide remediation recommendations...

[MS] Unwrap some Semantic Kernel (Power)Toys this holiday season - devamazonaws.blogspot.com

Image
Windows PowerToys has always been one of my favorite productivity hacks, and its latest release adds  Paste with Advanced AI , which takes it to a new level. This feature, powered by Semantic Kernel , transforms how you work with text, images, and data from your clipboard by applying AI-driven enhancements. What Does It Do? Advanced Paste uses the OpenAI API to analyze, reformat, and transform clipboard text based on the user’s input, for example: Summarize Text: Reduce lengthy text to its essentials. Translate Languages: Convert text from one language to another effortlessly. Generate Code: Describe a function and let the AI produce the corresponding code. Stylize Content: Rewrite text in the style of Shakespeare, Mark Twain, or even a corporate tone. Transform Text: Convert casual text into professional emails or polished messages Advanced Paste also has additional paste actions that work beyond simple text-based inputs: Image-to-Text: Extract the text from an ...

[MS] 使用 Dependabot 管理 .NET SDK 更新 - devamazonaws.blogspot.com

本文翻译自微软高级软件工程师 Jamie Magee 的 Using Dependabot to Manage .NET SDK Updates 保持 .NET SDK 处于最新版本对维护安全高效的应用程序至关重要。现在,Dependabot 可以更新 global.json 中的 .NET SDK 版本,这使您可以比以往更轻松地确保自己的应用程序始终运行最新的安全补丁和改进。 定期的更新 SDK非常重要,因为它们包含: 已知漏洞(CVE)的安全补丁 错误修复和性能改进 最新的开发工具和功能 使用 global.json 管理 SDK 版本 要管理您的 .NET SDK 版本,您通常会在项目中使用 global.json 文件 。此文件会指定项目应使用哪个版本的 SDK。以下是一个简单的 global.json 文件示例: { "sdk": { "version": "9.0.100" } } 如果您正在使用 GitHub Actions以及 dotnet/setup-dotnet ,此文件将确保在您的 CI/CD 管道中使用了正确的 SDK 版本。 配置 Dependabot 以进行 .NET SDK 更新   添加一个 dependabot.yml 文件到您代码仓库默认分支的 .github/dependabot.yml 路径下。如果您希望始终接收最新更新,最简单的配置如下所示: version: 2 updates: - package-ecosystem: "dotnet-sdk" directory: "/" 但是 .NET SDK 更新通常在“补丁星期二”(每月的第二个星期二)发布,因此您可能希望调整更新计划以每周仅检查一次更新。您可以通过添加 schedule 部分来实现: version: 2 updates: - package-ecosystem: "dotnet-sdk" directory: "/" schedule: interval: "weekly" day: ...

Amazon Connect launches support for 64 languages for Amazon Q in Connect agent assistance - devamazonaws.blogspot.com

Amazon Q in Connect now supports 64 languages for agent assistance capabilities. Customer service agents can now chat with Q for assistance in their native language and Q will provide answers, knowledge article links, and recommended step-by-step guides in said language. New languages supported include: Chinese, French, French (Canadian), Italian, Japanese, Korean, Malay, Portuguese, Spanish, Swedish, and Tagalog. For the full list of supported languages, please see the Languages supported by Amazon Connect features . For region availability, please see the availability of Amazon Connect features by Region . To learn more about Amazon Q in Connect, please visit the website or see the help documentation . Post Updated on December 19, 2024 at 09:50PM

Amazon MSK is now available in Asia Pacific (Malaysia) Region - devamazonaws.blogspot.com

Amazon Managed Streaming for Apache Kafka ( Amazon MSK ) is now available in Asia Pacific (Malaysia) Region. Amazon MSK is a fully managed service for Apache Kafka and Kafka Connect that makes it easier for you to build and run applications that use Apache Kafka as a data store. Amazon MSK is fully compatible with Apache Kafka, which enables you to more quickly migrate your existing Apache Kafka workloads to Amazon MSK with confidence or build new ones from scratch. With Amazon MSK, you spend more time building innovative streaming applications and less time managing Kafka clusters. Visit the AWS Regions page for all the regions where Amazon MSK is available. To get started, see the Amazon MSK Developer Guide .   Post Updated on December 18, 2024 at 06:00PM

[MS] Inside STL: The atomic shared_ptr - devamazonaws.blogspot.com

The C++20 standard introduced a specialization of std:: atomic for shared pointers: std:: atomic< shared_ptr< T>> . How does it work? Recall that a normal shared_ptr consists of two pointers: A stored pointer that the shared_ptr returns when you call get() and a pointer to a control block which holds the strong reference count, the weak reference count, and a pointer to the managed object. The atomic version of the shared_ptr has the same layout, with one change: The bottom two bits of the pointer to the control block are used as flags. Exercise : Why use the control block pointer instead of the stored pointer to store the flags? Both the glibc++ and msvc implementations use the bottom bit of the control block pointer as a lock bit: Before performing an operation on the atomic shared pointer, the implementation atomically sets the lock bit to indicate that an atomic operation is in progress. If anybody tries to set the lock bit and finds that it's already set, ...