0%

示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/// <summary>
/// 循环移位
/// </summary>
/// <param name="val">输入的数字</param>
/// <param name="iShiftBit">要移几位</param>
/// <param name="isLeft">移位的方向</param>
/// <returns>移位后的数字</returns>
private static uint CycleShift(uint val, int iShiftBit, bool isLeft)
{
uint temp = 0;
uint result = 0;
temp |= val;
if (isLeft)
{
val <<= iShiftBit;
temp >>= (32 - iShiftBit);
result = val | temp;
}
else
{
val >>= iShiftBit;
temp <<= (32 - iShiftBit);
result = val | temp;
}
return result;
}

示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Thread update;
public Form1()
{
InitializeComponent();
update = new Thread(UpdateFunc);
}

//子线程更新主界面Label值
void UpdateFunc()
{
while (true)
{
Invoke(()=> label1.Text = DateTime.Now.ToString("HH:mm:ss"));
Invoke((string x)=> label1.Text = x + DateTime.Now.ToString("HH:mm:ss"),"时间:");
Thread.Sleep(500);
}
}

限制可同时访问某一资源或资源池的线程数

Semaphore sema = new Semaphore(x,y)
x: 线程池中空位数
y: 线程池的总数

阅读全文 »

C++中各类型字符区别
阅读全文 »

MinIO Client SDK 为 MinIO 和 Amazon S3 兼容云存储服务提供更高级别的 API 支持.Net4.5及以上
阅读全文 »

利用Mermaid绘制图标 详见: https://github.com/mermaid-js/mermaid/blob/develop/README.zh-CN.md
阅读全文 »

ABS增减压参数配置文件路径在Config\ABSValveTestConfig中, 不同车型会自动生成相应配置文件
阅读全文 »