# git 重命名文件夹/文件
git mv -f <oldfolder> <newfolder>
# eg: 现有文件夹:test,需修改为:test_file
git mv -f test test_file
git add -u test_file # -u:会更新已经追踪的文件和文件夹
git commit -m "重命名文件夹"
git push origin master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 设置主机名称 (centos7+支持) | |
# centos6修改主机名的配置文件是 /etc/sysconfig/network | |
# centos7修改主机名的配置文件是 /etc/hostname | |
$hostnamectl set-hostname <your hostname> | |
--static # 注:该命令会同步修改 /etc/hostname | |
--pretty # 给主机起别名(昵称) | |
# eg: 设置为 ts01 | |
$hostnamectl set-hostname "ts01" --static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
/// <summary> | |
/// | |
/// </summary> | |
namespace ConsoleApp2 | |
{ | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Text; | |
namespace Common.Lib | |
{ | |
/// <summary> | |
/// 角色权限对象,拥有指定权限。(可支持64个独立的权限项) | |
/// </summary> | |
/// <typeparam name="T">泛型 T (权限列表)必须是一个枚举。</typeparam> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace MyTests | |
{ | |
[TestClass] | |
public class UnitTest1 | |
{ | |
/// <summary> | |
/// Test.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MaterielCodesComparer : IEqualityComparer<EntMaterielCodes> | |
{ | |
public bool Equals(EntMaterielCodes x, EntMaterielCodes y) | |
{ | |
if (Object.ReferenceEquals(x, y)) return true; | |
return x != null && y != null && x.RFIDCode == y.RFIDCode && x.UniqueCode == y.UniqueCode; | |
} | |
public int GetHashCode(EntMaterielCodes obj) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
并集:var union =arps.Union(flts).ToList(); | |
交集:var inters = arps.Intersect(flts)ToList(); | |
差集:var except= arps.Except(flts)ToList(); |