- 博客(10)
- 收藏
- 关注
原创 npm install C:\Program Files\Git\cmd\git.EXE ls-remote -h -t https://github.com/nhn/raphael.git
npm install C:\Program Files\Git\cmd\git.EXE ls-remote -h -t https://github.com/nhn/raphael.git
2023-03-09 11:22:51
343
原创 C#对象转字典
看了下网上的很多例子,写的都太繁琐,很多没用的东西,自己写一个简单的供大家参考。是一个泛型方法,可供任意model转换public static Dictionary<string, string> ModelToDic<T>(T obj){ Dictionary<string, string> map = new Dictionary<s...
2019-11-01 14:53:55
727
原创 sql sum,group by 分组求和后在求总和,with rollup,with cube的区别
有表数据如下: create table tt ( name varchar(10), num decimal(18,2), ph int ) insert into tt(name,num,ph) values ('test1',10,1) insert into tt(name,num,ph) values ('test1',30,1) insert...
2019-10-15 13:30:08
27078
原创 sql行转列2
sql多字段行转列创建数据表:create table tb(姓名 varchar(10),课程 varchar(10),分数 int)insert into tb values(‘张三’,‘语文’,74)insert into tb values(‘张三’,‘数学’,83)insert into tb values(‘张三’,‘物理’,93)insert into tb values...
2019-08-28 15:49:44
154
原创 C# post请求
public void Post() { try { string url = "https://baidu.com"; //需要访问的url地址 HttpClient client = new HttpClient(); String date = DateTime.N...
2019-08-28 15:13:30
201
原创 C# md5加密,MD5转16位
字符串MD5加密 public static string MD5Encrypt(string EncryptString) { if (string.IsNullOrEmpty(EncryptString)) { throw (new Exception("密文不得为空")); } var clearBytes = Encoding.UTF8.Ge...
2019-08-28 15:07:26
2612
原创 SQL删除表中字段name相同的数据,需要保留一条
表数据如下:删除字段IosVersion 相同的数据,保留id最小的一条方法1:sql如下:方法2: 采用distinct函数delete from AppVersion where IosVersion in( select distinct IosVersion from AppVersion )and Id not in (select min(Id) from AppVers...
2019-08-28 14:58:30
622
原创 Sql Server行转列
Sql Server行转列select STUFF((select ‘,’+ ColName from (select * from View_TableFieldInfo where TableName=‘Projects_Detail’ ) A ORDER by ColumnId FOR XML PATH(’’)),1,1,’’)表数据如下:需要查询所有的cloname列执行结果如下...
2019-08-28 14:49:37
221
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人