为了提高项目代码质量,所以往往会安装分析器。 但是呢,这些分析器在生成项目程序文件时,占了 10MB。这些 dll 用不上的,没必要留着占空间。 可以使用 VS 自带的属性管理器去除 也可以手动 打开项目 .csproj 文件,找到如下的两个节点 <PropertyGroup C[......]继续阅读
为了提高项目代码质量,所以往往会安装分析器。 但是呢,这些分析器在生成项目程序文件时,占了 10MB。这些 dll 用不上的,没必要留着占空间。 可以使用 VS 自带的属性管理器去除 也可以手动 打开项目 .csproj 文件,找到如下的两个节点 <PropertyGroup C[......]继续阅读
%# %# is used for formatted output, typically in the form %#p. %x is used to display in hexadecimal format, but the output format may vary depending o[......] 继续阅读
C language does not have a bool type, but many places require true and false. How to solve this? In C language, 1 and 0, or non-zero and 0, are genera[......] 继续阅读
C语言中没有 bool 类型,但是很多地方都需要 true 和 flase,怎么解决呢? C 语言 一般使用 1 和 0 或 非0 和 0 表示 true 和 flase。 例如 int a = 6666; int b = 161616; printf("%s",a &[......]继续阅读
Binary numbers, Any number bitwise ANDed with N ones results in itself; or ORed with N zeros results in itself. Any number bitwise ANDed with N zeros[......] 继续阅读
二进制数, 任何数与 N 个 1 进行按位与,结果等于自身;或者与 N 个 0 进行按位或,结果等于自身。 任何数与 N 个 0 进行按位与,结果是 N 个 0;任何数与 N 个 1 进行按位或,结果是 N 个 1; 与 N 个 1 按位与。 1 0 1 0 1 1 0 1 1 1 1 1 1 1[......] 继续阅读
背景: When debugging tests, it's necessary to use NSwag.AspNetCore to provide swagger services, but it's not needed for formal release deployment. The N[......] 继续阅读
背景: 调试测试 Debug 时需要使用 NSwag.AspNetCore ,提供 swagger 服务,但是正式发布部署,不需要用到。 NSwag.AspNetCore 的库文件达到6MB。 可以在项目文件中使用如下条件 Condition="'$(Configuration)[......] 继续阅读
This query is particularly useful for multi-table joins, as in join queries, some field data may be empty, and directly returning null is not very use[......] 继续阅读
这个查询对于多表联查特别有用,因为连接查询,有可能部分字段数据为空,直接返回null不太友好。 下面使用三个表来演示 SELECT eg.GroupId, eg.GroupName, egl.EquipGroupListId, egl.StaNo, egl.E[......]继续阅读
如果写 C# 时,使用了分析器,很可能会提示 string.ToString() 的行为可能因当前用户的区域设置而异 这里针对某些字符/字符串转换时出现的问题,做个列表。 IFormatProvider 这个接口用于实现字符串如何格式化转为数值类型。一般来说666、0.666 这样的数没问题,但是[......] 继续阅读
.NET Core does not have the functionality to obtain CPU usage and other information on Linux, so don't hold your breath. static void Main(stri[......]继续阅读
.NET Core 中没有获取 Linux 的 CPU使用率等信息的功能,死心吧。 static void Main(string[] args) { Console.WriteLine("系统运行情况");[......]继续阅读
之前个人理解错误,浮点数转换少了一步。因为当时看视频和别人博客的时候,发现很多人没有说清楚一些很细致的东西。首先,浮点数的表示,有 定点数据表示 浮点数据表示 IEEE754 定点数据表示 原理是将一个浮点数的整数和小数部分各自转为二进制,最高位表示符号位。例如使用定点数据表示,表示 -86.[......] 继续阅读
Example: Determining whether a string consists of alphanumeric characters and underscores: using System; using System.Diagnostics; using System.Text.R[......]继续阅读
示例: 判断字符串是否由字母数字下划线组成: using System; using System.Diagnostics; using System.Text.RegularExpressions; namespace ConsoleApp6 { class Program {[......]继续阅读
In C#, Parallel and Task.WhenAll are both used for parallel computing. Parallel is generally used only for CPU-bound operations. Refer to this link fo[......] 继续阅读