NumPy NumPy is the fundamental package for scientific computing in Python. It is a Python library that provides a multidimensional array object, various derived objects (like masked arrays and matrices), and a suite of routines for fast operations on arrays, i…

2023年11月25日 0条评论 70点热度 1人点赞 痴者工良 阅读全文

NumPy NumPy 是 Python 中用于科学计算的基本包。它是一个 Python 库,提供了一个多维数组对象、各种派生对象(比如屏蔽数组和矩阵) ,以及一系列用于数组快速操作的例程,包括数学、逻辑、形状操作、排序、选择、 i/o、离散傅里叶变换、基本线性代数、基本统计操作、随机模拟等等。 官网文档地址:https://numpy.org/ 单纯学习 Numpy 会比较闷,因为 Numpy 是用于科学计算的。只是学习了各种 API 的使用,会很苦闷学来干啥,跟人工智能有什么关系? 安装 numpy 比较简单,…

2023年11月25日 0条评论 2932点热度 1人点赞 痴者工良 阅读全文

Inherit from DiagnosticAnalyzer. Detecting async void Register the listener: public override void Initialize(AnalysisContext context) { context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); context.EnableConcurrentExecution(); //[......]继续阅读

2023年11月23日 0条评论 82点热度 0人点赞 痴者工良 阅读全文

继承 DiagnosticAnalyzer 。 检测 async void 注册监听器: public override void Initialize(AnalysisContext context) { context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); context.EnableConcurrentExecution(); // 注册分析类型,只分析方法 contex[......]继续阅读

2023年11月23日 0条评论 2506点热度 0人点赞 痴者工良 阅读全文

A project contains Chinese string directory paths, which causes compilation errors when invoking PowerShell in Jenkins. Attempts to set environment variables or use the chcp command have been ineffective. This is because the default csproj is saved with utf8-b…

2023年11月23日 0条评论 72点热度 0人点赞 痴者工良 阅读全文

A 项目中含有中文字符串目录路径,导致使用 Jenkins 时调用 Powershell 编译报错。 无论是设置环境变量还是使用 chcp 命令等,均无效。 这是因为默认 csproj 是使用 utf8-bom 保存的。 这样的特性会导致在本地电脑开发环境中正常,但是在服务器中编译就会报错。 需要改成正经的 utf8 编码重新保存文件才行。 [......] 继续阅读

2023年11月23日 0条评论 2219点热度 0人点赞 痴者工良 阅读全文

MainWindow window using Blazor WebView2: <Border Margin="0,0,0,0" Background="Transparent" BorderThickness="0" CornerRadius="0,0,0,0"> <Grid> <blazor[......]继续阅读

2023年11月22日 0条评论 106点热度 0人点赞 痴者工良 阅读全文

MainWindow 窗口使用 Blazor WebView2: <Border Margin="0,0,0,0" Background="Transparent" BorderThickness="0" CornerRadius="0,0,0,0"> <Grid> <blazor:BlazorWebView x:Name="webView" HostPage="{Bindi[......]继续阅读

2023年11月22日 0条评论 2571点热度 0人点赞 痴者工良 阅读全文

First, introduce PInvoke.net or Microsoft.Windows.CsWin32, refer to: https://www.whuanle.cn/archives/21436 Define two functions to get the screen dimensions without the taskbar: public static int GetSystemMetrics_SM_CYMAXIMIZED() { return PInvoke.GetSystemMetr…

2023年11月22日 0条评论 68点热度 0人点赞 痴者工良 阅读全文

先引入 PInvoke.net 或 Microsoft.Windows.CsWin32,请参考: https://www.whuanle.cn/archives/21436 定义两个获取屏幕去掉任务栏的长宽高函数: public static int GetSystemMetrics_SM_CYMAXIMIZED() { return PInvoke.GetSystemMetrics(Windows.Win32.UI.WindowsAndMessaging.SYSTEM_METRICS_INDEX.SM_CYMAX…

2023年11月22日 0条评论 1745点热度 0人点赞 痴者工良 阅读全文

PInvoke.net is the official library for interacting with the Win32 API, but it has been archived. This means that the Microsoft.Windows.CsWin32 package should now be used to interact with the Win32 API. However, Microsoft.Windows.CsWin32 is a bit cumbersome be…

2023年11月22日 2条评论 82点热度 0人点赞 痴者工良 阅读全文

PInvoke.net 是官方用于操作 Win32 API 的库,但是已经归档了。也就是后续需要使用 Microsoft.Windows.CsWin32 来操作 win32 API。 但是 Microsoft.Windows.CsWin32 比较麻烦,因为 Microsoft.Windows.CsWin32 使用的是 Rolsyn 技术动态生成代码,并且只能针对当前项目。当然,优点是动态生成部分代码合并到项目中,项目打包发布的时候,不需要依赖 Microsoft.Windows.CsWin32 包了,体积会小一些。…

2023年11月22日 2条评论 3531点热度 0人点赞 痴者工良 阅读全文

As shown in the figure: There are two configuration forms. One is to configure the template file within the project (for executable projects, not applicable for libraries), and the other is to configure it after the project has been compiled. The first method …

2023年11月22日 0条评论 100点热度 0人点赞 痴者工良 阅读全文

如图: 有两种配置形式。 一种是在项目中(可以启动的项目,类库不行)配置模板文件,另一种是在项目编译之后配置。 第一种方法在项目中新建一个 runtimeconfig.template.json 文件。 示例如下: { "runtimeOptions": { "configProperties": { "System.GC.ConserveMemory": 9 } } } 另一种是项目编译之后,项目下面会有个 {项目名称}.runtimeconfig.json 文件。手动修改即可。 [......] 继续阅读

2023年11月22日 0条评论 1878点热度 0人点赞 痴者工良 阅读全文

Create a new project that only uses netstandard2. The complete content of its csproj file is as follows: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <EnforceCodeStyleI…

2023年11月21日 0条评论 160点热度 0人点赞 痴者工良 阅读全文

新建一个项目,项目只能使用 netstandard2。 其 csproj 文件完整内容如下: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> <EnforceExtendedAn…

2023年11月21日 0条评论 1561点热度 0人点赞 痴者工良 阅读全文

您大可以相信工良出品。本文从 C# 角度开始一点点编码,逐步了解 RabbitMQ 编程的各种细节,学会消息处理机制和多种场景下的开发细节。虽然文章比较长,但是不会啰啰嗦嗦说一堆理论。

2023年11月16日 0条评论 122点热度 3人点赞 痴者工良 阅读全文

您大可以相信工良出品。本文从 C# 角度开始一点点编码,逐步了解 RabbitMQ 编程的各种细节,学会消息处理机制和多种场景下的开发细节。虽然文章比较长,但是不会啰啰嗦嗦说一堆理论。

2023年11月16日 0条评论 3127点热度 3人点赞 痴者工良 阅读全文

折腾了好一段时间,office 365、outlook 等的授权验证方式过于麻烦,因此记录开发步骤。 大概开发过程如下: Go to register an Azure account, and then register the application. The tenant invites the user to join the organization. Use the application to obtain user authorization via the OAuth 2.0 link. Obta…

2023年11月7日 11条评论 92点热度 2人点赞 痴者工良 阅读全文

折腾了好一段时间,office 365、outlook 等的授权验证方式过于麻烦,因此记录开发步骤。 大概开发过程如下: 1,去注册 Azure 账号,然后进行应用注册。 2,租户邀请该用户加入组织中。 3,使用应用通过 OAuth 2.0 链接,获取用户的授权。 4,获取用户的 access_token 访问用户信息、替用户发送邮件等。 但是这些过程并不是一帆风顺,有很多曲折。比如不能跨租户访问等,必须先邀请用户加入组织。 否则会报错: AADSTS50020: User account 'xxx@xxx.onm…

2023年11月7日 11条评论 10571点热度 2人点赞 痴者工良 阅读全文
13456754